Repository navigation
fix(android, desktop): the chat list loads past its first page - #62
Merged
Merged
Conversation
A read mark of this account from another device below the chat's last message left the unread counter as it was until the next chat list sync: the read event carried only the mark time. The core now recounts the chat after the mark and passes it on (maxly-core IosEvent.chatUnread); applyOwnRead takes that count when it is lower than the local one. A mark at the last message still clears the badge. Needs maxly-core with IosEvent.chatUnread (fighxy/maxly-core#4); core.lock must move to that commit before this builds.
It needs maxly-core with IosEvent.chatUnread (fighxy/maxly-core#4), which is not merged yet, so the iOS build would fail. Revert this revert once core.lock points at a core with that field. This reverts the previous commit.
CoreChatRepository.refresh loaded the whole chat list (loadAllChats, the CHATS_LIST pages after LOGIN's chatMarker) only while the core store had no chats. LOGIN itself puts the first chats into the store, so by the first refresh the store was never empty and only the first page came: on Android and desktop the chat list ended early and could not be scrolled further. The whole list now loads once per account and run (needsFullList), later refreshes ask the first page as before; clear() forgets it.
fighxy
force-pushed
the
claude/sweet-ramanujan-3q64b7
branch
2 times, most recently
from
November 17, 2026 03:01
84365e3 to
b05ec6d
Compare
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.
Проблема
На Android и ПК список чатов обрывался: дальше первой страницы его не прокрутить.
CoreChatRepository.refreshдогружал весь список (loadAllChats: страницыCHATS_LISTпослеchatMarkerизLOGIN) только пока в хранилище ядра не было ни одного чата. НоLOGINсам кладёт в хранилище первые чаты, поэтому к первому обновлению оно уже не пустое, и всегда шёлloadChats(), то есть только первая страница.Исправление
needsFullList). Дальнейшие обновления спрашивают первую страницу, как раньше.clear()при выходе забывает, что список был догружен.ChatListPagingTest.Примечание
В ветке был и iOS-коммит бейджа при частичном прочтении, но вместе с откатом: он ждал ядро. Итог слияния — только
maxly-shared. iOS-часть вместе с переводомcore.lock— в #63.Проверка
Локально не собиралось. На устройстве: аккаунт, у которого больше 50 чатов: после входа список листается до конца.