Make Selection toolbar take precedence over search toolbar (#7611)

This commit is contained in:
Andreas 2022-07-26 15:05:08 +02:00 committed by GitHub
parent 1c8da5fa97
commit 2b96709799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,17 +47,17 @@ fun LibraryToolbar(
onClickFilter: () -> Unit,
onClickRefresh: () -> Unit,
) = when {
state.searchQuery != null -> LibrarySearchToolbar(
searchQuery = state.searchQuery!!,
onChangeSearchQuery = { state.searchQuery = it },
onClickCloseSearch = { state.searchQuery = null },
)
state.selectionMode -> LibrarySelectionToolbar(
state = state,
onClickUnselectAll = onClickUnselectAll,
onClickSelectAll = onClickSelectAll,
onClickInvertSelection = onClickInvertSelection,
)
state.searchQuery != null -> LibrarySearchToolbar(
searchQuery = state.searchQuery!!,
onChangeSearchQuery = { state.searchQuery = it },
onClickCloseSearch = { state.searchQuery = null },
)
else -> LibraryRegularToolbar(
title = title,
hasFilters = state.hasActiveFilters,