improve: toggle selection mode when last item is unselected
This commit is contained in:
parent
0ad2680b45
commit
42022bf661
2 changed files with 6 additions and 0 deletions
|
|
@ -473,6 +473,9 @@ open class BrowseSourceScreenModel(
|
|||
}
|
||||
}
|
||||
state.copy(selection = newSelection)
|
||||
}.also {
|
||||
if (state.value.selection.isEmpty())
|
||||
toggleSelectionMode()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -249,6 +249,9 @@ abstract class SearchScreenModel(
|
|||
}
|
||||
}
|
||||
state.copy(selection = newSelection)
|
||||
}.also {
|
||||
if (state.value.selection.isEmpty())
|
||||
toggleSelectionMode()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue