mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 14:19:18 +01:00
add BackHandler add actionModeCounter
This commit is contained in:
parent
c14fcfdec3
commit
a0625e5de2
@ -1,5 +1,6 @@
|
||||
package eu.kanade.presentation.more.download
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
@ -160,6 +161,9 @@ private fun DownloadStatsAppBar(
|
||||
navigateUp = navigateUp,
|
||||
onMultiDeleteClicked = onMultiDeleteClicked,
|
||||
)
|
||||
BackHandler(
|
||||
onBack = onCancelActionMode,
|
||||
)
|
||||
} else {
|
||||
SearchToolbar(
|
||||
navigateUp = navigateUp,
|
||||
@ -212,6 +216,9 @@ private fun DownloadStatsAppBar(
|
||||
},
|
||||
scrollBehavior = scrollBehavior,
|
||||
)
|
||||
BackHandler(
|
||||
onBack = { onChangeSearchQuery(null) },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +237,7 @@ private fun DownloadStatsActionAppBar(
|
||||
modifier = modifier,
|
||||
title = stringResource(R.string.label_download_stats),
|
||||
onCancelActionMode = onCancelActionMode,
|
||||
actions = {
|
||||
actionModeActions = {
|
||||
AppBarActions(
|
||||
listOf(
|
||||
AppBar.Action(
|
||||
@ -251,6 +258,7 @@ private fun DownloadStatsActionAppBar(
|
||||
),
|
||||
)
|
||||
},
|
||||
actionModeCounter = selected.size,
|
||||
scrollBehavior = scrollBehavior,
|
||||
navigateUp = navigateUp,
|
||||
)
|
||||
@ -296,7 +304,7 @@ fun SortDropdownMenu(
|
||||
onDismissRequest = onDismissRequest,
|
||||
) {
|
||||
listOfNotNull(
|
||||
SortingMode.BY_ALPHABET to stringResource(R.string.action_sort_alpha),
|
||||
SortingMode.BY_ALPHABET to stringResource(R.string.action_sort_A_Z),
|
||||
SortingMode.BY_SIZE to stringResource(R.string.action_sort_size),
|
||||
).map { (mode, string) ->
|
||||
SortItem(
|
||||
|
@ -58,6 +58,7 @@
|
||||
<!-- reserved for #4048 -->
|
||||
<string name="action_filter_empty">Remove filter</string>
|
||||
<string name="action_sort_alpha">Alphabetically</string>
|
||||
<string name="action_sort_A_Z">A-Z</string>
|
||||
<string name="action_sort_count">Total entries</string>
|
||||
<string name="action_sort_total">Total chapters</string>
|
||||
<string name="action_sort_last_read">Last read</string>
|
||||
|
Loading…
Reference in New Issue
Block a user