Repository navigation
fix: the inbox paints immediately, not after every re-sync - #505
Merged
Merged
Conversation
The skeleton was gated on the live sync state, so a background re-sync on every launch held a populated inbox behind the skeleton for as long as the import took — the chats appeared only when it finished. The skeleton is for an inbox that is still being filled for the first time. Once there is anything to show, the list is shown and the re-sync updates it in place, as before.
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.
What was wrong
#503 gated the inbox skeleton on the live sync state:
That is correct for the first import, but the app re-syncs on every launch. On a phone with ~95k messages and 3,162 threads that sync takes a while, so a populated inbox stayed behind the skeleton on every open, and the chats appeared only when the sync ended — a delay that did not exist before.
The fix
The skeleton is only for an inbox that is still being filled for the first time. As soon as there is anything to show, the list is shown and the background re-sync updates it in place — which is how every release before #503 behaved. Applied to both inbox screens.
Proof
JUnit
InboxSkeletonTestnow asserts a populated inbox is never held behind the skeleton, and that an empty one still waits for its first import.On the reporting phone: the previous build showed the skeleton on each open until the sync finished; with this build the conversations are on screen at launch, with the sync running behind them.