Skip to content

Commit eb03daa

Browse files
authored
feat(Compose): Improve patches selector tab by adding the bundle version (#2545)
1 parent 9e2a791 commit eb03daa

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

app/src/main/java/app/revanced/manager/ui/model/BundleInfo.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import kotlinx.coroutines.flow.map
1111
*/
1212
data class BundleInfo(
1313
val name: String,
14+
val version: String?,
1415
val uid: Int,
1516
val compatible: List<PatchInfo>,
1617
val incompatible: List<PatchInfo>,
@@ -78,7 +79,7 @@ data class BundleInfo(
7879
targetList.add(it)
7980
}
8081

81-
BundleInfo(source.getName(), source.uid, compatible, incompatible, universal)
82+
BundleInfo(source.getName(), source.currentVersion(), source.uid, compatible, incompatible, universal)
8283
}
8384
}
8485

app/src/main/java/app/revanced/manager/ui/screen/PatchesSelectorScreen.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,19 @@ fun PatchesSelectorScreen(
405405
)
406406
}
407407
},
408-
text = { Text(bundle.name) },
408+
text = {
409+
Column(horizontalAlignment = Alignment.CenterHorizontally) {
410+
Text(
411+
text = bundle.name,
412+
style = MaterialTheme.typography.bodyMedium
413+
)
414+
Text(
415+
text = bundle.version!!,
416+
style = MaterialTheme.typography.bodySmall,
417+
color = MaterialTheme.colorScheme.onSurfaceVariant
418+
)
419+
}
420+
},
409421
selectedContentColor = MaterialTheme.colorScheme.primary,
410422
unselectedContentColor = MaterialTheme.colorScheme.onSurfaceVariant
411423
)

0 commit comments

Comments
 (0)