From 96fb9f467621735036e590974f2a949ff3f93d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Opi=C5=82owski?= Date: Tue, 3 Nov 2020 21:45:23 +0100 Subject: [PATCH] For #12971 - Show collection saved snackbar above FAB (#16311) --- .../org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt index 5553fc4e34..93c730c327 100644 --- a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt @@ -70,7 +70,12 @@ class TabTrayDialogFragment : AppCompatDialogFragment(), UserInteractionHandler private lateinit var tabTrayDialogStore: TabTrayDialogFragmentStore private val snackbarAnchor: View? - get() = if (tabTrayView.fabView.new_tab_button.isVisible) tabTrayView.fabView.new_tab_button + get() = if (tabTrayView.fabView.new_tab_button.isVisible || + tabTrayView.mode != Mode.Normal) tabTrayView.fabView.new_tab_button + /* During selection of the tabs to the collection, the FAB is not visible, + which leads to not attaching a needed AnchorView. That's why, we're not only checking, if it's not visible, + but also if we're not in a "Normal" mode, so after selecting tabs for a collection, we're pushing snackbar + above the FAB, as we're switching from "Multiselect" to "Normal". */ else null private val collectionStorageObserver = object : TabCollectionStorage.Observer {