Commit Graph

15 Commits (1f633edd7d4436f20ead4ba657b1284b94cca0c6)

Author SHA1 Message Date
Andrew Gaul cfbad1dae9 Show undo snackbars with padding with static bottom toolbar
This specifically fixes the close tab snackbar.  This commit mirrors
the logic when not using Undo from
9e876ebc44.  References #14982.
4 years ago
Sebastian Kaspari 3983c509dc Use "undo" implementation from Android Components.
This is not the super fancy version yet - since we still need to restore into SessionManager and
haven't fully switched to BrowserStore yet. However AC having knowledge about "undo" and whether
it was performed or not, will help us with features like "recently closed tabs". And once we
can improve "undo", Fenix will get all the nice things automatically.

Requires:
https://github.com/mozilla-mobile/android-components/pull/8449
4 years ago
Tiger Oakes b563576335
Closes #14131: Move constants to dimens.xml (#14135)
Co-authored-by: Elise Richards <erichards@mozilla.com>
4 years ago
Tiger Oakes ac2d65cc5e
Replace setPadding with updatePadding (#14137) 4 years ago
Sawyer Blatz afbb039a08
For #11851: Close tab tray when last tab closed (#12615) 4 years ago
David Walsh 8b843ac9e5 Fix elevation for snackbar and fab 4 years ago
ekager b8fba63be4 For #9890 - Do not display full screen snackbar with toolbar padding 4 years ago
Sawyer Blatz e3ed7ed268
Issue #9128 & #9222 & #9499: Refactors snackbar creation and fixes placement (#9628) 4 years ago
Sawyer Blatz 1372ed5837 For #7970: Updates snackbars for accessibility 4 years ago
Kate Glazko e038e0c41d 5 years ago
Sawyer Blatz b6e6e36ccd For #561: Fix stutter of search icon & text when animating 5 years ago
Sawyer Blatz 75a25c9bd0 For #561: Fix linting issue 5 years ago
Jeff Boek c592a69aad For #561 - Fixes snackbar placement on homeview 5 years ago
Tiger Oakes d01bb8c442 Use lifecycleScope for collections fragments 5 years ago
Grisha Kruglov 5f42a65c2a No issue: improve allowUndo
This patch fixes a few issues:
- it was an extension on a CoroutineScope, but that was quite misleading
since the Main dispatcher would be always used regardless of what dispatcher
the owning CoroutineScope was configured with.
- timing was reliant on exact value of the undocumented Snackbar.LENGTH_LONG duration
- coroutine cancellation relied on cooperation of the 'operation' suspend function,
which we can't depend on

New 'allowUndo' fully controls its timing, doesn't imply a dispatcher to its consumers,
and doesn't rely on cooperation of passed-in suspend blocks for cancellation to work.
5 years ago