Ignore notifications without shortcutId for notification badge number calculation

This commit is contained in:
MM20 2022-04-01 22:08:40 +02:00
parent 6501c263dd
commit 0d1b6fa33b
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -27,7 +27,8 @@ class NotificationBadgeProvider : BadgeProvider, KoinComponent {
} else {
val badge = Badge(
number = it.sumOf {
it.notification.number
if(it.notification.shortcutId == null) 0
else it.notification.number
},
progress = it.mapNotNull {
if (!it.notification.extras.containsKey(Notification.EXTRA_PROGRESS)) return@mapNotNull null