File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
app/src/main/java/app/revanced/manager/ui/screen Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Arrangement
44import androidx.compose.foundation.layout.fillMaxSize
55import androidx.compose.foundation.lazy.items
66import androidx.compose.runtime.Composable
7+ import androidx.compose.runtime.remember
78import androidx.compose.runtime.snapshots.SnapshotStateList
89import androidx.compose.ui.Alignment
910import androidx.compose.ui.Modifier
@@ -19,13 +20,19 @@ fun BundleListScreen(
1920 selectedSources : SnapshotStateList <PatchBundleSource >,
2021 bundlesSelectable : Boolean ,
2122) {
23+ val sortedSources = remember(sources) {
24+ sources.sortedByDescending { source ->
25+ source.state.value.patchBundleOrNull()?.patches?.size ? : 0
26+ }
27+ }
28+
2229 LazyColumnWithScrollbar (
2330 modifier = Modifier .fillMaxSize(),
2431 horizontalAlignment = Alignment .CenterHorizontally ,
2532 verticalArrangement = Arrangement .Top ,
2633 ) {
2734 items(
28- sources ,
35+ sortedSources ,
2936 key = { it.uid }
3037 ) { source ->
3138 BundleItem (
You can’t perform that action at this time.
0 commit comments