Skip to content

Conversation

@sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Feb 2, 2026

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

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

Issue:

Unread messages badge is not removed instantly when user closes a conversation after reading all messages.

Cause:

The app relies on UpdateConversationReadDateUseCase which has a 3-second debounce. If the user closes the conversation before debounce completes, the badge persists until the delayed update finishes.

Solution:

  • Inject and call MarkConversationAsReadLocallyUseCase when leaving the conversation to immediately update the local read date
  • Use DisposableEffect to handle all exit scenarios (back button, system gestures, navigation, etc.)
  • Track the last read timestamp in MessageComposerViewModel and flush it on conversation close

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.67%. Comparing base (1092a3c) to head (0487629).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4557      +/-   ##
===========================================
+ Coverage    48.64%   48.67%   +0.02%     
===========================================
  Files          576      576              
  Lines        19950    19956       +6     
  Branches      3336     3337       +1     
===========================================
+ Hits          9705     9713       +8     
+ Misses        9218     9216       -2     
  Partials      1027     1027              
Files with missing lines Coverage Δ
...conversations/composer/MessageComposerViewModel.kt 75.26% <100.00%> (+4.00%) ⬆️

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 1092a3c...0487629. Read the comment docs.

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

@sbakhtiarov sbakhtiarov enabled auto-merge February 9, 2026 13:52
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@sbakhtiarov sbakhtiarov added this pull request to the merge queue Feb 9, 2026
Merged via the queue into develop with commit c5c947f Feb 9, 2026
16 checks passed
@sbakhtiarov sbakhtiarov deleted the fix/unread-badge-update branch February 9, 2026 18:42
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.

4 participants