Skip to content

Conversation

@SpiritCroc
Copy link
Contributor

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 #1673

Signed-off-by: Tobias Büttner [email protected]

Pull Request Checklist

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 element-hq#1673
@bmarty
Copy link
Member

bmarty commented Jul 12, 2021

@BillCarsonFr WDYT about this change? I though we were building the same notifications each time we want to refresh the navigation drawer, but it's maybe not true

@bmarty
Copy link
Member

bmarty commented Jul 13, 2021

We are a bit scared that this change brings some regressions...

@bmarty bmarty added this to the Sprint - Element 1.3.2 milestone Sep 30, 2021
@ouchadam ouchadam self-assigned this Oct 1, 2021
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!

@ouchadam
Copy link
Contributor

ouchadam commented Oct 1, 2021

@bmarty from my testing there were no regressions and it fixes #1673, however there is the possibility that the summary count could go out of sync if events are removed as that won't trigger set hasNewEvent = true

although... the count is already incorrect~

// FIXME roomIdToEventMap.size is not correct, this is the number of rooms
  • screenshots from latest beta
2021-10-01T17:05:28,454972740+01:00 2021-10-01T17:04:46,431305246+01:00

@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Unit Test Results

  42 files  ±0    42 suites  ±0   52s ⏱️ ±0s
  83 tests ±0    83 ✔️ ±0  0 💤 ±0  0 ±0 
220 runs  ±0  220 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 1dd2d41. ± Comparison against base commit 1dd2d41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification keeps resending

3 participants