Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
esafirm committed Oct 23, 2022
1 parent 583e837 commit d132e7e
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,22 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener

private val isCameraOnly by lazy { cameraOnlyConfig != null }

private val startForCameraResult = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result: ActivityResult ->
private val startForCameraResult = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result: ActivityResult ->
if (result.resultCode == Activity.RESULT_OK) {
val intent = result.data
// Handle the Intent
if(intent?.extras?.isEmpty == true){
if (intent?.extras?.isEmpty == true) {
cameraModule.removeImage(this)
setResult(RESULT_CANCELED)
finish()
}else {
} else {
cameraModule.getImage(this, intent) { images ->
finishPickImages(ImagePickerUtils.createResultIntent(images))
}
}
}else{
} else {
cameraModule.removeImage(this)
setResult(RESULT_CANCELED)
finish()
Expand Down Expand Up @@ -139,7 +141,7 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener
if (!imagePickerFragment.handleBack()) {
super.onBackPressed()
}
}else {
} else {
super.onBackPressed()
}
}
Expand Down Expand Up @@ -181,4 +183,4 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener
setResult(RESULT_OK, result)
finish()
}
}
}

0 comments on commit d132e7e

Please sign in to comment.