Do not notify again for old events
Resending the notification here can trigger other system components or apps that listen to new notifications, such as connected smart watches or automation tools. Fixes https://github.com/vector-im/element-android/issues/1673
This commit is contained in:
parent
910c0ff326
commit
451c2379ec
1
changelog.d/1673.bugfix
Normal file
1
changelog.d/1673.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Avoid resending notifications that are already shown
|
@ -457,7 +457,7 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
||||
|
||||
if (eventList.isEmpty() || eventList.all { it.isRedacted }) {
|
||||
notificationUtils.cancelNotificationMessage(null, SUMMARY_NOTIFICATION_ID)
|
||||
} else {
|
||||
} else if (hasNewEvent) {
|
||||
// FIXME roomIdToEventMap.size is not correct, this is the number of rooms
|
||||
val nbEvents = roomIdToEventMap.size + simpleEvents.size
|
||||
val sumTitle = stringProvider.getQuantityString(R.plurals.notification_compat_summary_title, nbEvents, nbEvents)
|
||||
|
Loading…
x
Reference in New Issue
Block a user