7 Commits

Author SHA1 Message Date
Aditya Patil
dcd7ad6114
fix: refetch the open channel after background when its window is deep or was jumped to (#2281)
* fix: refetch the open channel after background when its window is deep or was jumped to

* fix: catch up a claimed window instead of replacing it

* fix: bound the deep-window catch-up to what the window can hold

The catch-up merge trims the oldest rows past the window cap, and in a
deep window those are the rows being read — losing them yanked the
scroll. The request is now capped to the window's headroom, and a full
window skips the catch-up; when more arrived than fits, the page
detaches the window and "jump to present" takes over. Adds loader tests
for the replace, catch-up, headroom and full-window cases, and updates
the performance notes.

* fix: refresh the open channel's whole window after a connection break
A window deeper than 70 messages, or one reached by a jump, got no
refresh on resume: new messages, reactions, edits and deletes from the
gap were all missed until the channel was reopened. Tapping a
notification for the open channel did not reopen it, so that could be
a long wait.
The quiet refresh now refetches the window's own span, from its oldest
message up and capped at the window limit, through a new
include_from_message flag on get_newer_messages. The messages being
read are always in the response, so nothing is dropped and the scroll
never moves, at any depth; every loaded message comes back in its
current state, so changes to existing messages land too, and a message
that does not come back is removed. Unchanged messages keep their
objects. This replaces the depth guard and the newer-only catch-up.

* fix: harden the window refresh against reactions, deletes and mid-flight changes

---------

Co-authored-by: Nikhil Kothari <nik.kothari22@live.com>
2026-10-12 15:50:33 +05:30
Nikhil Kothari
fed678e1f1 fix: update unread count immediately locally and handle not visible tabs for unread count posting 2026-07-31 01:35:39 +05:30
Nikhil Kothari
bd32544f2b fix: handle deletion of messages for mentions and threads 2026-07-31 01:16:58 +05:30
Nikhil Kothari
267cf081d9 fix: syncing of unread counts on removing a reaction and on refocus/reconnect 2026-07-31 00:56:46 +05:30
Nikhil Kothari
313ac1a8fa feat: pull to refresh, swipe to mark as read, error retry for threads and notifications 2026-07-24 19:22:11 +05:30
Nikhil Kothari
0f657f9aef chore: update docs 2026-07-17 14:10:41 +05:30
Nikhil Kothari
1673b845ac fix: remove not found illustration 2026-07-15 18:23:14 +05:30