Revert "For #19739 - Moves argument to initial state init"

This reverts commit f198e110d7.
upstream-sync
Jonathan Almeida 3 years ago committed by Jonathan Almeida
parent f198e110d7
commit aeb186f79c

@ -86,12 +86,7 @@ class TabsTrayFragment : AppCompatDialogFragment() {
val containerView = inflater.inflate(R.layout.fragment_tab_tray_dialog, container, false) val containerView = inflater.inflate(R.layout.fragment_tab_tray_dialog, container, false)
inflater.inflate(R.layout.component_tabstray2, containerView as ViewGroup, true) inflater.inflate(R.layout.component_tabstray2, containerView as ViewGroup, true)
val initState = tabsTrayStore = StoreProvider.get(this) { TabsTrayStore() }
if (requireArguments().getBoolean(EXTRA_MULTI_SELECT))
TabsTrayState(mode = TabsTrayState.Mode.Select(emptySet()))
else TabsTrayState()
tabsTrayStore = StoreProvider.get(this) { TabsTrayStore(initialState = initState) }
fabView = LayoutInflater.from(containerView.context) fabView = LayoutInflater.from(containerView.context)
.inflate(R.layout.component_tabstray_fab, containerView, true) .inflate(R.layout.component_tabstray_fab, containerView, true)
@ -266,6 +261,10 @@ class TabsTrayFragment : AppCompatDialogFragment() {
owner = this, owner = this,
view = view view = view
) )
if (requireArguments().getBoolean(EXTRA_MULTI_SELECT)) {
tabsTrayStore.dispatch(TabsTrayAction.EnterSelectMode)
}
} }
override fun onConfigurationChanged(newConfig: Configuration) { override fun onConfigurationChanged(newConfig: Configuration) {

Loading…
Cancel
Save