mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-07 10:34:44 +00:00
fix(android): show flavor channel in about
This commit is contained in:
@@ -971,7 +971,7 @@ private fun AboutSettingsScreen(
|
||||
listOf(
|
||||
SettingsMetric("Android App", BuildConfig.VERSION_NAME),
|
||||
SettingsMetric("Build", BuildConfig.VERSION_CODE.toString()),
|
||||
SettingsMetric("Channel", "Play"),
|
||||
SettingsMetric("Channel", androidDistributionChannel()),
|
||||
SettingsMetric("Gateway", currentGatewayVersion ?: "Not connected"),
|
||||
),
|
||||
)
|
||||
@@ -994,6 +994,14 @@ private fun AboutSettingsScreen(
|
||||
}
|
||||
}
|
||||
|
||||
internal fun androidDistributionChannel(flavor: String = BuildConfig.FLAVOR): String =
|
||||
when (flavor.trim()) {
|
||||
"play" -> "Play"
|
||||
"thirdParty" -> "Third-party"
|
||||
"" -> "Unknown"
|
||||
else -> flavor.trim()
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AboutStatusRow(
|
||||
title: String,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package ai.openclaw.app.ui
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class SettingsScreensTest {
|
||||
@Test
|
||||
fun androidDistributionChannelUsesBuildFlavorLabels() {
|
||||
assertEquals("Play", androidDistributionChannel("play"))
|
||||
assertEquals("Third-party", androidDistributionChannel("thirdParty"))
|
||||
assertEquals("Unknown", androidDistributionChannel(""))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user