Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1673.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid resending notifications that are already shown
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Contributor

@ouchadam ouchadam Oct 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can confirm this fixes the issue, great catch!

it might be worth renaming the variable to hasGroupChanged as what this logic is doing is only updating the summary group notification when one of the group children has been notified

I'm also happy to make the change in a separate PR as I'll be in the area attempting to address the double sound issue

for more details #1673 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot Adam, I think we can merge the PR now!

// 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)
Expand Down