Skip to content

fix: the inbox paints immediately, not after every re-sync - #505

Merged
an1ndra merged 1 commit into
Developfrom
fix/inbox-first-paint
Nov 19, 2026
Merged

an1ndra merged 1 commit into
Developfrom
fix/inbox-first-paint

Conversation

@an1ndra

@an1ndra an1ndra commented Nov 19, 2026

Copy link
Copy Markdown
Owner

What was wrong

#503 gated the inbox skeleton on the live sync state:

val loaded = minSkeletonShown && syncProgress == null && (syncDone || !readSmsAllowed)

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

val loaded = minSkeletonShown &&
    (conversations.isNotEmpty() || !readSmsAllowed || (syncDone && syncProgress == null))

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 InboxSkeletonTest now 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.

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.
@an1ndra
an1ndra merged commit 2145e4e into Develop Nov 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant