mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-17 14:36:19 +08:00
feat: Sort bundles by patch count
This commit is contained in:
@ -19,13 +19,17 @@ fun BundleListScreen(
|
|||||||
selectedSources: SnapshotStateList<PatchBundleSource>,
|
selectedSources: SnapshotStateList<PatchBundleSource>,
|
||||||
bundlesSelectable: Boolean,
|
bundlesSelectable: Boolean,
|
||||||
) {
|
) {
|
||||||
|
val sortedSources = sources.sortedBy {
|
||||||
|
it.state.value.patchBundleOrNull()?.patches?.size
|
||||||
|
}
|
||||||
|
|
||||||
LazyColumnWithScrollbar(
|
LazyColumnWithScrollbar(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Top,
|
verticalArrangement = Arrangement.Top,
|
||||||
) {
|
) {
|
||||||
items(
|
items(
|
||||||
sources,
|
sortedSources,
|
||||||
key = { it.uid }
|
key = { it.uid }
|
||||||
) { source ->
|
) { source ->
|
||||||
BundleItem(
|
BundleItem(
|
||||||
|
Reference in New Issue
Block a user