Skip to content

Commit 8c7f337

Browse files
committed
Try to block same intent to trigger a same notification;
1 parent 4823193 commit 8c7f337

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

android/src/main/java/com/b8ne/RNPusherPushNotifications/NotificationsMessagingService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ public static void read(final ReactInstanceManager reactInstanceManager, Activit
2727
Intent intent = reactActivity.getIntent();
2828
final WritableMap map = new WritableNativeMap();
2929

30+
boolean launchedFromHistory = intent != null ? (intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0 : false;
31+
3032
Bundle extras = intent.getExtras();
31-
if (extras != null) {
33+
if (!launchedFromHistory & extras != null) {
3234
WritableMap payload = Arguments.createMap();
3335

3436
for (String key : extras.keySet()) {

0 commit comments

Comments
 (0)