Add notification not showing debuglog.

This commit is contained in:
Cody Henthorne
2022-05-06 12:59:03 -04:00
parent 1a6bd3d3f2
commit 55919cba59

View File

@@ -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) {