From 241f32d1e4f9661cf4cd2cc953ed4a957f1b5522 Mon Sep 17 00:00:00 2001 From: Jonathan Almeida Date: Wed, 16 Jun 2021 16:35:32 -0400 Subject: [PATCH] [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/19739 - Moves argument to initial state init" This reverts commit e8948798bff353fcd55ff2df45a651f77790880e. --- .../org/mozilla/fenix/tabstray/TabsTrayFragment.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt index 1d63bc206..4ca0ae5db 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt @@ -86,12 +86,7 @@ class TabsTrayFragment : AppCompatDialogFragment() { val containerView = inflater.inflate(R.layout.fragment_tab_tray_dialog, container, false) inflater.inflate(R.layout.component_tabstray2, containerView as ViewGroup, true) - val initState = - if (requireArguments().getBoolean(EXTRA_MULTI_SELECT)) - TabsTrayState(mode = TabsTrayState.Mode.Select(emptySet())) - else TabsTrayState() - - tabsTrayStore = StoreProvider.get(this) { TabsTrayStore(initialState = initState) } + tabsTrayStore = StoreProvider.get(this) { TabsTrayStore() } fabView = LayoutInflater.from(containerView.context) .inflate(R.layout.component_tabstray_fab, containerView, true) @@ -266,6 +261,10 @@ class TabsTrayFragment : AppCompatDialogFragment() { owner = this, view = view ) + + if (requireArguments().getBoolean(EXTRA_MULTI_SELECT)) { + tabsTrayStore.dispatch(TabsTrayAction.EnterSelectMode) + } } override fun onConfigurationChanged(newConfig: Configuration) {