For #9351 - Show snackbars with toolbar padding to work with dynamic toolbar
This commit is contained in:
parent
5e75140b3d
commit
16b40992d2
|
@ -19,12 +19,12 @@ class FenixSnackbarDelegate(val view: View) :
|
||||||
listener: ((v: View) -> Unit)?
|
listener: ((v: View) -> Unit)?
|
||||||
) {
|
) {
|
||||||
if (listener != null && action != 0) {
|
if (listener != null && action != 0) {
|
||||||
FenixSnackbar.make(view, duration = FenixSnackbar.LENGTH_SHORT)
|
FenixSnackbar.makeWithToolbarPadding(view, duration = FenixSnackbar.LENGTH_SHORT)
|
||||||
.setText(view.context.getString(text))
|
.setText(view.context.getString(text))
|
||||||
.setAction(view.context.getString(action)) { listener.invoke(view) }
|
.setAction(view.context.getString(action)) { listener.invoke(view) }
|
||||||
.show()
|
.show()
|
||||||
} else {
|
} else {
|
||||||
FenixSnackbar.make(view, duration = FenixSnackbar.LENGTH_SHORT)
|
FenixSnackbar.makeWithToolbarPadding(view, duration = FenixSnackbar.LENGTH_SHORT)
|
||||||
.setText(view.context.getString(text))
|
.setText(view.context.getString(text))
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ class DefaultBrowserToolbarController(
|
||||||
topSiteStorage.addTopSite(it.title, it.url)
|
topSiteStorage.addTopSite(it.title, it.url)
|
||||||
}
|
}
|
||||||
MainScope().launch {
|
MainScope().launch {
|
||||||
FenixSnackbar.make(swipeRefresh, Snackbar.LENGTH_SHORT)
|
FenixSnackbar.makeWithToolbarPadding(swipeRefresh, Snackbar.LENGTH_SHORT)
|
||||||
.setText(
|
.setText(
|
||||||
swipeRefresh.context.getString(R.string.snackbar_added_to_top_sites)
|
swipeRefresh.context.getString(R.string.snackbar_added_to_top_sites)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user