Merge pull request #3657 from SpiritCroc/notification_repetition

Do not notify again for old events
This commit is contained in:
Benoit Marty 2021-10-01 18:20:53 +02:00 committed by GitHub
commit 1dd2d410e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/1673.bugfix Normal file
View File

@ -0,0 +1 @@
Avoid resending notifications that are already shown

View File

@ -458,7 +458,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)