Skip to content

Commit

Permalink
fix(camera): set settings again on callbacks (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Sep 3, 2021
1 parent 125369a commit 908bd68
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public void openPhotos(final PluginCall call) {

@ActivityCallback
public void processCameraImage(PluginCall call, ActivityResult result) {
settings = getSettings(call);
if (imageFileSavePath == null) {
call.reject(IMAGE_PROCESS_NO_FILE_ERROR);
return;
Expand All @@ -276,6 +277,7 @@ public void processCameraImage(PluginCall call, ActivityResult result) {

@ActivityCallback
public void processPickedImage(PluginCall call, ActivityResult result) {
settings = getSettings(call);
Intent data = result.getData();
if (data == null) {
call.reject("No image picked");
Expand Down Expand Up @@ -320,7 +322,7 @@ private void processPickedImage(Uri imageUri, PluginCall call) {
@ActivityCallback
private void processEditedImage(PluginCall call, ActivityResult result) {
isEdited = true;

settings = getSettings(call);
if (result.getResultCode() == Activity.RESULT_CANCELED) {
// User cancelled the edit operation, if this file was picked from photos,
// process the original picked image, otherwise process it as a camera photo
Expand Down

0 comments on commit 908bd68

Please sign in to comment.