Repository navigation
fix(ui): drop toasts under sheets and swap the countdown in place - #950
Merged
Merged
Conversation
Matches Android's FloatingToastHostState. A sheet or the bill covering the host dismisses the toast showing, and show() drops a toast while covered or while any sheet or dialog is presented, so it can't time out unseen with its Undo out of reach. show(_:inPlace:) keeps the showing toast's view, so the developer-mode countdown changes text without replaying the entrance.
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.
Follow-up to #949, matching the toast rules Android shipped in code-payments/code-android-app#1669.
A covered host no longer keeps a toast under the cover. Before this, a toast dispatched while a sheet was up timed out hidden behind it, with Undo out of reach.
ToastController.isCovereddismisses the toast showing.HomeTabViewsets it from router sheets and the bill.showdrops a toast while covered, or while any sheet or dialog is presented over the app. That second check catches sheets a screen presents itself, which never touch the router.Countdowns update in place.
show(_:inPlace:)keeps the showing toast's view and restarts its timer, so the You tab's developer countdown changes its text instead of replaying the entrance on every tap.ToastControllerTestscovers replacement, covering, dropping, and in-place slots.