feat: Sort bundles by patch count

This commit is contained in:
Ushie
2025-05-05 01:29:06 +03:00
parent 6e57a6e977
commit 419fe3bac1

View File

@ -19,13 +19,17 @@ fun BundleListScreen(
selectedSources: SnapshotStateList<PatchBundleSource>,
bundlesSelectable: Boolean,
) {
val sortedSources = sources.sortedBy {
it.state.value.patchBundleOrNull()?.patches?.size
}
LazyColumnWithScrollbar(
modifier = Modifier.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Top,
) {
items(
sources,
sortedSources,
key = { it.uid }
) { source ->
BundleItem(