From 48b443eaf1d607c57651f1a5ea5642a78933ae75 Mon Sep 17 00:00:00 2001 From: Patrick Schneider Date: Thu, 14 Mar 2024 09:37:27 +0100 Subject: [PATCH] [fix] notifications now open the correct note on tap. --- .../privacyfriendlynotes/receiver/NotificationReceiver.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/secuso/privacyfriendlynotes/receiver/NotificationReceiver.kt b/app/src/main/java/org/secuso/privacyfriendlynotes/receiver/NotificationReceiver.kt index ec9fb4ee..a74af2a0 100644 --- a/app/src/main/java/org/secuso/privacyfriendlynotes/receiver/NotificationReceiver.kt +++ b/app/src/main/java/org/secuso/privacyfriendlynotes/receiver/NotificationReceiver.kt @@ -68,8 +68,9 @@ class NotificationReceiver : BroadcastReceiver() { } ).apply { putExtra(BaseNoteActivity.EXTRA_ID, notification) + flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK }.let { - PendingIntent.getActivity(context, 0, it, PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT) + PendingIntent.getActivity(context, notification, it, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT) } val mNotifyMgr = ContextCompat.getSystemService(context, NotificationManager::class.java) as NotificationManager if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {