From 6317a792226d231e5119f07315aa61848ed46db5 Mon Sep 17 00:00:00 2001 From: Sawyer Blatz Date: Tue, 21 Jul 2020 12:27:20 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/12791: Fix issue with undo snackbar last tab --- .../java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt | 2 +- 1 file changed, 1 insertion(+), 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 e21e5e3be6..c86dbe38ad 100644 --- a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayDialogFragment.kt @@ -206,7 +206,7 @@ class TabTrayDialogFragment : AppCompatDialogFragment() { } // Check if this is the last tab of this session type - val isLastOpenTab = sessionManager.sessions.filter { snapshot.session.private }.size == 1 + val isLastOpenTab = sessionManager.sessions.filter { snapshot.session.private == it.private }.size == 1 val rootView = if (isLastOpenTab) { requireActivity().getRootView()!! } else { requireView().tabLayout } val anchorView = if (isLastOpenTab) { null } else { snackbarAnchor }