Skip to content

Commit

Permalink
fix(promise): RNShareImpl to resolve callback. (#1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidimas committed Aug 28, 2023
1 parent e045f41 commit 720411a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/src/main/java/cl/json/RNShareImpl.java
Expand Up @@ -55,13 +55,16 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
WritableMap reply = Arguments.createMap();
reply.putBoolean("success", false);
reply.putString("message", "CANCELED");
TargetChosenReceiver.callbackResolve(reply);
} else if (resultCode == Activity.RESULT_OK) {
WritableMap reply = Arguments.createMap();
reply.putBoolean("success", true);
TargetChosenReceiver.callbackResolve(reply);
}
}
}


@Override
public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
onActivityResult(requestCode, resultCode, data);
}
Expand Down

0 comments on commit 720411a

Please sign in to comment.