From 3d1d062f4d392516068e607586c4d413f71948b8 Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Mon, 28 Nov 2022 06:42:37 -0500 Subject: [PATCH] Fix opening wrong topic on click --- app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt | 2 +- fastlane/metadata/android/en-US/changelog/29.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt b/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt index 8f5a7aa..3e0e002 100644 --- a/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt +++ b/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt @@ -308,7 +308,7 @@ class NotificationService(val context: Context) { } return TaskStackBuilder.create(context).run { addNextIntentWithParentStack(intent) // Add the intent, which inflates the back stack - getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) // Get the PendingIntent containing the entire back stack + getPendingIntent(Random().nextInt(), PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) // Get the PendingIntent containing the entire back stack } } diff --git a/fastlane/metadata/android/en-US/changelog/29.txt b/fastlane/metadata/android/en-US/changelog/29.txt index ef5587c..3bb7643 100644 --- a/fastlane/metadata/android/en-US/changelog/29.txt +++ b/fastlane/metadata/android/en-US/changelog/29.txt @@ -10,6 +10,7 @@ Bug fixes + maintenance: * Fix notification icon color (#480, thanks to @s-h-a-r-d for reporting) * Fix topics do not re-subscribe to Firebase after restoring from backup (#511) * Fix crashes from large images (#474, thanks to @daedric7 for reporting) +* Fix notification click opens wrong subscription (#261, thanks to @SMAW for reporting) * Add donate button (no ticket) Additional translations: