Эх сурвалжийг харах

Merge pull request #2128 from nextcloud/bugfix/2111/open-wrong-conversation

Use unique request code to create PendingIntent
Marcel Hibbe 2 жил өмнө
parent
commit
073a6a1a90

+ 4 - 1
app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java

@@ -292,7 +292,10 @@ public class NotificationWorker extends Worker {
                 }
                 }
         }
         }
 
 
-        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
+        // Use unique request code to make sure that a new PendingIntent gets created for each notification
+        // See https://github.com/nextcloud/talk-android/issues/2111
+        int requestCode = (int) System.currentTimeMillis();
+        PendingIntent pendingIntent = PendingIntent.getActivity(context, requestCode, intent, 0);
 
 
         Uri uri = Uri.parse(signatureVerification.getUserEntity().getBaseUrl());
         Uri uri = Uri.parse(signatureVerification.getUserEntity().getBaseUrl());
         String baseUrl = uri.getHost();
         String baseUrl = uri.getHost();