Skip to content

fix: delay before updating unread messages badge (WPB-23126)#3834

Open
sbakhtiarov wants to merge 1 commit intodevelopfrom
fix/unread-badge-update
Open

fix: delay before updating unread messages badge (WPB-23126)#3834
sbakhtiarov wants to merge 1 commit intodevelopfrom
fix/unread-badge-update

Conversation

@sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Feb 2, 2026

TaskWPB-23126 [Android] Improve unread messages indicator reset

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.

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

sonarqubecloud bot commented Feb 2, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Test Results

0 tests   - 4 295   0 ✅  - 4 182   0s ⏱️ - 5m 0s
0 suites  -   723   0 💤  -   113 
0 files    -   723   0 ❌ ±    0 

Results for commit f5f605b. ± Comparison against base commit 59e901d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

🐰 Bencher Report

Branchfix/unread-badge-update
Testbedubuntu-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-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymicroseconds (µs)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
697.10 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
468,892.66 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,358,453.19 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
21,431.75 µs
🐰 View full continuous benchmarking report in Bencher

@datadog-wireapp
Copy link

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1 Test failed

kaliumLogicModuleShouldNotExposeEitherTypesInPublicAPI[jvm] from com.wire.kalium.logic.architecture.UseCaseRulesTest (Datadog) (Fix with Cursor)
java.lang.AssertionError: Either types should not be exposed in public API of :kalium:logic module. Found 1 violation(s):
  - Public interface 'MarkConversationAsReadLocallyUseCase' in MarkConversationAsReadLocallyUseCase has function 'invoke' returning Either: Either<StorageFailure, Boolean>

java.lang.AssertionError: Either types should not be exposed in public API of :kalium:logic module. Found 1 violation(s):
  - Public interface 'MarkConversationAsReadLocallyUseCase' in MarkConversationAsReadLocallyUseCase has function 'invoke' returning Either: Either<StorageFailure, Boolean>

	at com.wire.kalium.logic.architecture.UseCaseRulesTest.kaliumLogicModuleShouldNotExposeEitherTypesInPublicAPI(UseCaseRulesTest.kt:165)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f5f605b | Docs | Was this helpful? Give us feedback!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants