feat(Compose): Improve patches selector tab by adding the bundle version (#2545)

This commit is contained in:
Brosssh 2025-05-14 19:33:05 +02:00 committed by oSumAtrIX
parent 9d329e0f54
commit 18199bb968
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 15 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import kotlinx.coroutines.flow.map
*/
data class BundleInfo(
val name: String,
val version: String?,
val uid: Int,
val compatible: List<PatchInfo>,
val incompatible: List<PatchInfo>,
@ -78,7 +79,7 @@ data class BundleInfo(
targetList.add(it)
}
BundleInfo(source.getName(), source.uid, compatible, incompatible, universal)
BundleInfo(source.getName(), source.currentVersion(), source.uid, compatible, incompatible, universal)
}
}

View File

@ -405,7 +405,19 @@ fun PatchesSelectorScreen(
)
}
},
text = { Text(bundle.name) },
text = {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Text(
text = bundle.name,
style = MaterialTheme.typography.bodyMedium
)
Text(
text = bundle.version!!,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
},
selectedContentColor = MaterialTheme.colorScheme.primary,
unselectedContentColor = MaterialTheme.colorScheme.onSurfaceVariant
)