From dd48d074bea72d39e9a6721d442611b8500e5ae4 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 21 Nov 2022 23:45:15 -0600 Subject: [PATCH] Fix persistent notifications on Android 13 --- .../main/java/org/tasks/notifications/NotificationManager.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/tasks/notifications/NotificationManager.kt b/app/src/main/java/org/tasks/notifications/NotificationManager.kt index 4165ac12a..3466beb41 100644 --- a/app/src/main/java/org/tasks/notifications/NotificationManager.kt +++ b/app/src/main/java/org/tasks/notifications/NotificationManager.kt @@ -193,7 +193,9 @@ class NotificationManager @Inject constructor( ringTimes = 1 } if (preferences.usePersistentReminders()) { - notification.flags = notification.flags or NotificationCompat.FLAG_NO_CLEAR + notification.flags = notification.flags or + NotificationCompat.FLAG_NO_CLEAR or + NotificationCompat.FLAG_ONGOING_EVENT } val deleteIntent = Intent(context, NotificationClearedReceiver::class.java) deleteIntent.putExtra(EXTRA_NOTIFICATION_ID, notificationId)