mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
Merge pull request #8365 from af7567/notifications
Use unique requestcode for notification PendingIntents
This commit is contained in:
commit
eceb3a13d4
2 changed files with 4 additions and 2 deletions
|
@ -76,7 +76,8 @@ public class DeckApiImpl implements DeckApi {
|
|||
|
||||
private PendingIntent createPendingIntent(@NonNull Intent intent, @NonNull Notification notification, @NonNull User user) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
return PendingIntent.getActivity(context, 0, putExtrasToIntent(intent, notification, user),
|
||||
return PendingIntent.getActivity(context, notification.getNotificationId(),
|
||||
putExtrasToIntent(intent, notification, user),
|
||||
PendingIntent.FLAG_ONE_SHOT);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ class NotificationWork constructor(
|
|||
}
|
||||
intent.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
|
||||
pendingIntent = PendingIntent.getActivity(context, notification.getNotificationId(), intent,
|
||||
PendingIntent.FLAG_ONE_SHOT)
|
||||
}
|
||||
|
||||
val pushNotificationId = randomId.nextInt()
|
||||
|
|
Loading…
Reference in a new issue