From d95cc663a0cc8615ad5c1173b2df4410e6358439 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 15 Sep 2026 12:51:21 -0400 Subject: [PATCH] fix(tipping): stop the new-chat button flashing blank white after the checkmark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolving a username dispatched `UpdateProcessingState()` alongside `UserResolved`, resetting the button to idle. `CodeButton` reads raw `enabled` for its background, so the fill snapped from the disabled White10 to solid White instantly while the content crossfade was still ~300ms into taking the checkmark away — a blank white button in the frames right before `navigator.replace` opened the chat. The chat replaces this screen, so idle is a state it never shows again. Dropping the reset holds the checkmark until the screen goes. --- .../com/flipcash/app/tipping/internal/NewChatViewModel.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/flipcash/features/tipping/src/main/kotlin/com/flipcash/app/tipping/internal/NewChatViewModel.kt b/apps/flipcash/features/tipping/src/main/kotlin/com/flipcash/app/tipping/internal/NewChatViewModel.kt index c94bbce2ce..0978454e28 100644 --- a/apps/flipcash/features/tipping/src/main/kotlin/com/flipcash/app/tipping/internal/NewChatViewModel.kt +++ b/apps/flipcash/features/tipping/src/main/kotlin/com/flipcash/app/tipping/internal/NewChatViewModel.kt @@ -81,9 +81,13 @@ internal class NewChatViewModel @Inject constructor( .map { username -> resolve(username) } .onResult( onSuccess = { identifier -> + // No reset back to idle afterwards. The chat replaces this screen, so idle is + // a state it never shows again — but the button reaches it first: the fill + // snaps from the disabled White10 to a solid White while the content is still + // crossfading the checkmark out, so the last thing seen before the chat + // arrives is a blank white button. Holding the checkmark leaves it alone. dispatchSuccessThen(Event.UpdateProcessingState(success = true)) { dispatchEvent(Event.UserResolved(identifier)) - dispatchEvent(Event.UpdateProcessingState()) } }, onError = { cause ->