Repository navigation
fix(ios): a partial read on another device lowers the badge - #63
Merged
Merged
Conversation
Restores the change that waited for maxly-core with IosEvent.chatUnread (fighxy/maxly-core#4). core.lock now points at that core. This reverts the revert of the previous change.
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.
Проблема
Если на другом устройстве чат прочитан не до конца, бейдж на iOS не менялся до следующей сверки списка: событие «прочитано» несло только время отметки, и iOS умела только обнулить бейдж, когда отметка доходила до последнего сообщения.
Изменение
core.lockпереведён наe054011(feat(ios): a read event carries the chat's unread counter after the own mark maxly-core#4): ядро передаёт в событии «прочитано» счётчик после своей отметки (IosEvent.chatUnread).CoreEvent.chatUnread→SyncEngine→ChatRepositoryImpl.applyOwnRead: отметка ниже последнего сообщения берёт подсчёт ядра, если он меньше местного счётчика. Отметка до последнего по-прежнему обнуляет бейдж. Без подсчёта счётчик не трогается до сверки списка, как раньше.ReadStatusTests, описание вmaxly-ios/docs/read-marks.md.Это продолжение #62: туда вошло исправление списка чатов на Android и ПК, а iOS-часть ждала слияния ядра и пришла в ветку уже после слияния #62.
Проверка
Локально не собиралось. На устройстве: прочитать часть чата на другом устройстве — бейдж на телефоне уменьшается до числа оставшихся непрочитанных; прочитать до конца — бейдж пропадает.
Generated by Claude Code