mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
feat: show the build's commit hash under About
A short, faded commit hash next to the version in Settings > About, so a bug report can name the exact build. Baked into BuildConfig at build time from `git rev-parse HEAD` (fixed 7 chars, so the same commit always yields the same value and the APK stays reproducible); empty, and hidden, on a build with no git metadata such as a source tarball.
This commit is contained in:
@@ -388,7 +388,16 @@ fun SettingsScreen(
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(R.string.app_name)) },
|
||||
supportingContent = {
|
||||
Text(stringResource(R.string.settings_about_version, BuildConfig.VERSION_NAME))
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(stringResource(R.string.settings_about_version, BuildConfig.VERSION_NAME))
|
||||
if (BuildConfig.COMMIT_HASH.isNotEmpty()) {
|
||||
Spacer(Modifier.width(8.dp))
|
||||
Text(
|
||||
BuildConfig.COMMIT_HASH,
|
||||
color = MaterialTheme.colorScheme.outline,
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
leadingContent = { Icon(Icons.Rounded.Info, contentDescription = null) },
|
||||
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
|
||||
|
||||
Reference in New Issue
Block a user