Skip to content

Commit

Permalink
Close CropActivity if returning back from camera app without taking p…
Browse files Browse the repository at this point in the history
…icture. (#287)
  • Loading branch information
ArmChilingarov authored Dec 13, 2021
1 parent f36636a commit 3f56bfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [4.0.1] - unreleased
### Fixed
- When TakePictureContract returns false or null return null result. [#287](https://github.com/CanHub/Android-Image-Cropper/issues/287)


## [4.0.0] - 30/11/21
### Fixed
- Issue where some devices based on MIUI would not retrieve image from gallery [#253](https://github.com/CanHub/Android-Image-Cropper/issues/253)
Expand Down Expand Up @@ -183,4 +188,4 @@ Versions `2.0.1` and `2.0.2` are similar, issues with jitpack.
- Android 10, 11 Scope Storage

## [1.0.0] - 21/11/20
- Copy from previous repo [ArthurHub](https://github.com/ArthurHub/Android-Image-Cropper/)
- Copy from previous repo [ArthurHub](https://github.com/ArthurHub/Android-Image-Cropper/)
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ open class CropImageActivity :
onPickImageResult(uri)
}
private val takePicture = registerForActivityResult(ActivityResultContracts.TakePicture()) {
if (it) onPickImageResult(latestTmpUri)
if (it) onPickImageResult(latestTmpUri) else onPickImageResult(null)
}

public override fun onCreate(savedInstanceState: Bundle?) {
Expand Down

0 comments on commit 3f56bfe

Please sign in to comment.