From 55919cba590f846869871cc8e995c17f586545ae Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Fri, 6 May 2022 12:59:03 -0400 Subject: [PATCH] Add notification not showing debuglog. --- .../securesms/notifications/v2/MessageNotifierV2.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/MessageNotifierV2.kt b/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/MessageNotifierV2.kt index 89807ece3..a22f84a52 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/MessageNotifierV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/MessageNotifierV2.kt @@ -222,6 +222,14 @@ class MessageNotifierV2(context: Application) : MessageNotifier { SignalDatabase.mmsSms.setNotifiedTimestamp(System.currentTimeMillis(), smsIds, mmsIds) Log.i(TAG, "threads: ${state.threadCount} messages: ${state.messageCount}") + + if (Build.VERSION.SDK_INT >= 24) { + val ids = state.notificationIds + stickyThreads.map { (_, stickyThread) -> stickyThread.notificationId } + val notShown = ids - ServiceUtil.getNotificationManager(context).getDisplayedNotificationIds().getOrDefault(emptySet()) + if (notShown.isNotEmpty()) { + Log.e(TAG, "Notifications should be showing but are not for ${notShown.size} threads") + } + } } override fun clearReminder(context: Context) {