Commit 9d6c9df
Fix unread badge not disappearing upon opening the chat (#5994)
* Stop using kluent
* Fix `markChannelAsRead` not working when `lastReadMessageId` is correct but `unreadCount` > 0
The `markChannelAsRead` function is now allowed to proceed if there are unread messages, even if the `lastReadMessageId` already matches the ID of the latest message. This handles cases where the server state for the unread count might be out of sync with the client.
* CHANGELOG
---------
Co-authored-by: Petar Velikov <[email protected]>1 parent d913aed commit 9d6c9df
File tree
3 files changed
+182
-49
lines changed- stream-chat-android-state/src
- main/java/io/getstream/chat/android/state/plugin/state/channel/internal
- test/java/io/getstream/chat/android/state/plugin/state/channel/internal
3 files changed
+182
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
576 | 579 | | |
577 | | - | |
578 | | - | |
| 580 | + | |
| 581 | + | |
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| |||
0 commit comments