Revert "For #19739 - Adds start tabsTray with multiSelect support"
This reverts commit d8288f5e89
.
This commit is contained in:
parent
aeb186f79c
commit
5be35df969
|
@ -261,10 +261,6 @@ class TabsTrayFragment : AppCompatDialogFragment() {
|
|||
owner = this,
|
||||
view = view
|
||||
)
|
||||
|
||||
if (requireArguments().getBoolean(EXTRA_MULTI_SELECT)) {
|
||||
tabsTrayStore.dispatch(TabsTrayAction.EnterSelectMode)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
|
@ -406,8 +402,6 @@ class TabsTrayFragment : AppCompatDialogFragment() {
|
|||
}
|
||||
|
||||
companion object {
|
||||
const val EXTRA_MULTI_SELECT = "enterMultiselect"
|
||||
|
||||
// Minimum number of list items for which to show the tabs tray as expanded.
|
||||
const val EXPAND_AT_LIST_SIZE = 4
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import kotlinx.android.synthetic.main.tabstray_multiselect_items.view.*
|
|||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import kotlinx.coroutines.flow.map
|
||||
import mozilla.components.lib.state.helpers.AbstractBinding
|
||||
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
|
||||
|
@ -69,6 +70,8 @@ class SelectionBannerBinding(
|
|||
|
||||
override suspend fun onState(flow: Flow<TabsTrayState>) {
|
||||
flow.map { it.mode }
|
||||
// ignore initial mode update; we never start in select mode.
|
||||
.drop(1)
|
||||
.ifChanged()
|
||||
.collect { mode ->
|
||||
val isSelectMode = mode is Select
|
||||
|
|
Loading…
Reference in New Issue