Make Selection toolbar take precedence over search toolbar (#7611)
This commit is contained in:
parent
1c8da5fa97
commit
2b96709799
1 changed files with 5 additions and 5 deletions
|
@ -47,17 +47,17 @@ fun LibraryToolbar(
|
||||||
onClickFilter: () -> Unit,
|
onClickFilter: () -> Unit,
|
||||||
onClickRefresh: () -> Unit,
|
onClickRefresh: () -> Unit,
|
||||||
) = when {
|
) = when {
|
||||||
state.searchQuery != null -> LibrarySearchToolbar(
|
|
||||||
searchQuery = state.searchQuery!!,
|
|
||||||
onChangeSearchQuery = { state.searchQuery = it },
|
|
||||||
onClickCloseSearch = { state.searchQuery = null },
|
|
||||||
)
|
|
||||||
state.selectionMode -> LibrarySelectionToolbar(
|
state.selectionMode -> LibrarySelectionToolbar(
|
||||||
state = state,
|
state = state,
|
||||||
onClickUnselectAll = onClickUnselectAll,
|
onClickUnselectAll = onClickUnselectAll,
|
||||||
onClickSelectAll = onClickSelectAll,
|
onClickSelectAll = onClickSelectAll,
|
||||||
onClickInvertSelection = onClickInvertSelection,
|
onClickInvertSelection = onClickInvertSelection,
|
||||||
)
|
)
|
||||||
|
state.searchQuery != null -> LibrarySearchToolbar(
|
||||||
|
searchQuery = state.searchQuery!!,
|
||||||
|
onChangeSearchQuery = { state.searchQuery = it },
|
||||||
|
onClickCloseSearch = { state.searchQuery = null },
|
||||||
|
)
|
||||||
else -> LibraryRegularToolbar(
|
else -> LibraryRegularToolbar(
|
||||||
title = title,
|
title = title,
|
||||||
hasFilters = state.hasActiveFilters,
|
hasFilters = state.hasActiveFilters,
|
||||||
|
|
Reference in a new issue