Skip to content

Whispr v1.1.12 — Whispr v1.1.12 — chat view stability on slower devices

Choose a tag to compare

@pointbreaklab-byte pointbreaklab-byte released this 07 May 11:59
· 79 commits to main since this release

Bug fix

Messages no longer vanish from the chat view on slower devices.

Reported on Galaxy F23 (Helio G80, 4 GB RAM, slow eMMC): the
recipient sees the message in the chat list with the unread badge,
but as soon as they tap to open the chat, the message blanks out.
Same on the sender's side — the bubble appears, then disappears.
S25 Ultra and S21 FE didn't reproduce.

Root cause

The chat screen's UI sync logic in chat_screen.dart merged the
provider's authoritative message list with any in-flight "temp-"
optimistic-send bubbles, then overwrote the on-screen list with
the result. The merge had a brittle assumption: anything that
isn't temp-prefixed must be in the provider snapshot. If the
provider's _messages field was ever transiently empty between
notifications — which happens during the SQL await inside
_loadMessages if a notifyListeners() from a different code
path (battery banner, contact refresh, network state change)
fires mid-flight — the sync computed merged = [] and the screen
went blank for a frame.

Fast devices skipped past that window before the listener fired.
Slower devices hit it.

What changed

_syncFromProvider now treats an empty providerMessages snapshot
as "not loaded yet" when the screen is already showing real
(non-temp) messages, instead of mirroring it into the UI. The real
"clear chat" / "navigate back" / "lock" paths use direct setter
assignments to reset the screen, not this listener — so this
guard doesn't suppress any legitimate clear.

One small change to one file. No DB schema, no wire format, no
other behaviour touched.

Verification

  • Architecture: arm64-v8a
  • Signed: release keystore (CN=Whispr)

SHA-256: 4afff51fc3afc5483eef7d46d793b908ef62ecb149e818f649f8637cf384def7