Distinct notificationy by shortcutId to calculate badge count

This commit is contained in:
MM20 2022-04-02 12:32:23 +02:00
parent dbd0d11a87
commit 2b2dcb2f89
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -26,7 +26,7 @@ class NotificationBadgeProvider : BadgeProvider, KoinComponent {
send(null)
} else {
val badge = Badge(
number = it.sumOf {
number = it.distinctBy { it.notification.shortcutId }.sumOf {
if(it.notification.shortcutId == null) 0
else it.notification.number
},