Skip to content

fix: update last notified correctly, notification delay (WPB-22701)#4548

Merged
MohamadJaara merged 4 commits intodevelopfrom
fix/notifications-update
Feb 11, 2026
Merged

fix: update last notified correctly, notification delay (WPB-22701)#4548
MohamadJaara merged 4 commits intodevelopfrom
fix/notifications-update

Conversation

@sbakhtiarov
Copy link
Copy Markdown
Contributor

@sbakhtiarov sbakhtiarov commented Jan 27, 2026

https://wearezeta.atlassian.net/browse/WPB-22701

https://wearezeta.atlassian.net/browse/WPB-22701

What's new in this PR?

Issues

Application was not showing all notification when receiving a lot of messages.

Causes (Optional)

  1. Messages for notifications are queried from the Messages table based on the message timestamp and conversation last_notified_date. Last notified date was not updated correctly and some messages were filtered out by query.

  2. Notification updates are based on the activeNotifications property of NotificationManager. New notifications for same conversation are combined with already shown notifications. When multiple notifications are shown very fast activeNotifications property does not always have up-to-date list of notifications. This is causing incorrect updates based on out-of-date list.

Solutions

  1. Get the timestamp of the last notified message and use it as last_notified_date for conversation.
  2. Add small delay after adding/updating notification to let the NotificationManager update activeNotifications.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.66%. Comparing base (65b0efe) to head (89ba157).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...re/android/notification/WireNotificationManager.kt 77.77% 1 Missing and 1 partial ⚠️
...android/notification/MessageNotificationManager.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4548   +/-   ##
========================================
  Coverage    48.66%   48.66%           
========================================
  Files          576      576           
  Lines        19952    19958    +6     
  Branches      3337     3338    +1     
========================================
+ Hits          9709     9713    +4     
- Misses        9216     9217    +1     
- Partials      1027     1028    +1     
Files with missing lines Coverage Δ
...android/notification/MessageNotificationManager.kt 0.00% <0.00%> (ø)
...re/android/notification/WireNotificationManager.kt 72.90% <77.77%> (+0.14%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65b0efe...89ba157. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MohamadJaara MohamadJaara added this pull request to the merge queue Feb 11, 2026
Merged via the queue into develop with commit 6d6a9cc Feb 11, 2026
18 checks passed
@MohamadJaara MohamadJaara deleted the fix/notifications-update branch February 11, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants