fix: delay before updating unread messages badge (WPB-23126)#3834
Open
sbakhtiarov wants to merge 1 commit intodevelopfrom
Open
fix: delay before updating unread messages badge (WPB-23126)#3834sbakhtiarov wants to merge 1 commit intodevelopfrom
sbakhtiarov wants to merge 1 commit intodevelopfrom
Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Contributor
saleniuk
approved these changes
Feb 2, 2026
Contributor
|
| Branch | fix/unread-badge-update |
| Testbed | ubuntu-latest |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | microseconds (µs) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | 📈 view plot | 697.10 µs |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | 📈 view plot | 468,892.66 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | 📈 view plot | 1,358,453.19 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | 📈 view plot | 21,431.75 µs |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



https://wearezeta.atlassian.net/browse/WPB-23126
What's new in this PR?
Issue:
Unread messages badge is not removed instantly when user closes a conversation after reading all messages.
Cause:
UpdateConversationReadDateUseCase uses ParallelConversationWorkQueue with a 3-second debounce delay. When the user closes the conversation before the debounce completes, the local read date isn't updated yet.
Solution:
Add MarkConversationAsReadLocallyUseCase that directly updates the conversation read date in the local database without going through the debounce queue. The existing debounced flow continues to handle sending confirmations and syncing to other devices.