android: mark messages read when visible and sync unread across devices
This commit is contained in:
@@ -706,3 +706,11 @@
|
||||
- read status is now acknowledged by the latest visible message id in chat (not only latest incoming),
|
||||
- delivery status still uses latest incoming message.
|
||||
- This removes cases where unread badge reappears after chat list refresh because the previous read ack used an outdated incoming id.
|
||||
|
||||
### Step 107 - Read-on-visible + cross-device unread sync
|
||||
- Implemented read acknowledgement from actual visible messages in `ChatScreen`:
|
||||
- tracks visible `LazyColumn` rows and sends read up to max visible incoming message id.
|
||||
- unread now drops as messages appear on screen while scrolling.
|
||||
- Improved cross-device sync (web <-> android):
|
||||
- `message_read` realtime event now parses `user_id` and `last_read_message_id`.
|
||||
- on `message_read`, Android refreshes chat snapshot from backend to keep unread counters aligned across devices.
|
||||
|
||||
Reference in New Issue
Block a user