mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/14982 - Show snackbars with padding with static bottom toolbar
This commit is contained in:
parent
abe4ccd2ea
commit
0fbfbb5516
@ -120,6 +120,7 @@ class FenixSnackbar private constructor(
|
||||
val callback = FenixSnackbarCallback(content)
|
||||
val shouldUseBottomToolbar = view.context.settings().shouldUseBottomToolbar
|
||||
val toolbarHeight = view.resources.getDimensionPixelSize(R.dimen.browser_toolbar_height)
|
||||
val dynamicToolbarEnabled = view.context.settings().isDynamicToolbarEnabled
|
||||
|
||||
return FenixSnackbar(parent, content, callback, isError).also {
|
||||
it.duration = durationOrAccessibleDuration
|
||||
@ -133,7 +134,7 @@ class FenixSnackbar private constructor(
|
||||
// can't intelligently position the snackbar on the upper most view.
|
||||
// Ideally we should not pass ContentFrameLayout in, but it's the only
|
||||
// way to display snackbars through a fragment transition.
|
||||
view is ContentFrameLayout
|
||||
(view is ContentFrameLayout || !dynamicToolbarEnabled)
|
||||
) {
|
||||
toolbarHeight
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user