Distinct notificationy by shortcutId to calculate badge count
This commit is contained in:
parent
dbd0d11a87
commit
2b2dcb2f89
@ -26,7 +26,7 @@ class NotificationBadgeProvider : BadgeProvider, KoinComponent {
|
|||||||
send(null)
|
send(null)
|
||||||
} else {
|
} else {
|
||||||
val badge = Badge(
|
val badge = Badge(
|
||||||
number = it.sumOf {
|
number = it.distinctBy { it.notification.shortcutId }.sumOf {
|
||||||
if(it.notification.shortcutId == null) 0
|
if(it.notification.shortcutId == null) 0
|
||||||
else it.notification.number
|
else it.notification.number
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user