@@ -42,8 +42,15 @@ import `in`.hridayan.ashell.core.presentation.utils.syncedRotationAndScale
4242fun LatestVersionDialog (onDismiss : () -> Unit ) {
4343 val (angle, scale) = syncedRotationAndScale()
4444 val appVersionName = stringResource(R .string.version_name) + " : " + BuildConfig .VERSION_NAME
45- val appVersionCode =
46- stringResource(R .string.version_code) + " : " + BuildConfig .VERSION_CODE .toString()
45+
46+ @Suppress(" KotlinConstantConditions" )
47+ val flavorDisplay = when (BuildConfig .FLAVOR ) {
48+ BuildConfig .DIST_FLAVOR_GITHUB -> " GitHub"
49+ BuildConfig .DIST_FLAVOR_FDROID -> " F-Droid"
50+ else -> stringResource(R .string.unknown)
51+ }
52+
53+ val appVersionCode = stringResource(R .string.flavor) + " : " + flavorDisplay
4754
4855 DialogContainer (onDismiss = onDismiss) {
4956 Box (
@@ -83,14 +90,14 @@ fun LatestVersionDialog(onDismiss: () -> Unit) {
8390 horizontalAlignment = Alignment .CenterHorizontally ,
8491 verticalArrangement = Arrangement .spacedBy(10 .dp)
8592 ) {
86- AnimatedInfoCard (appVersionName)
87- AnimatedInfoCard (appVersionCode)
93+ InfoChip (appVersionName)
94+ InfoChip (appVersionCode)
8895 }
8996 }
9097}
9198
9299@Composable
93- private fun AnimatedInfoCard (text : String ) {
100+ private fun InfoChip (text : String ) {
94101 CustomCard (
95102 shape = CustomCardShape (50 ),
96103 colors = CardDefaults .cardColors(
0 commit comments