Merge pull request #1113 from judemanutd/patch-2

Resolve display notification promise
This commit is contained in:
Chris Bianca 2018-05-22 16:52:31 +01:00 committed by GitHub
commit bc0326b3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -283,6 +283,11 @@ public class DisplayNotificationTask extends AsyncTask<Void, Void, Void> {
if (reactContext != null) {
Utils.sendEvent(reactContext, "notifications_notification_displayed", Arguments.fromBundle(notification));
}
if (promise != null) {
promise.resolve(null);
}
} catch (Exception e) {
Log.e(TAG, "Failed to send notification", e);
if (promise != null) {