Skip to content

Commit 88826c5

Browse files
committed
feat: display release level and version name in PreferredPage About Card
1 parent bdc6ac2 commit 88826c5

File tree

1 file changed

+9
-1
lines changed
  • app/src/main/java/com/rosan/installer/ui/page/settings/preferred

1 file changed

+9
-1
lines changed

app/src/main/java/com/rosan/installer/ui/page/settings/preferred/PreferredPage.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ import androidx.compose.ui.res.vectorResource
7070
import androidx.compose.ui.text.font.FontWeight
7171
import androidx.compose.ui.unit.dp
7272
import com.rosan.installer.R
73+
import com.rosan.installer.build.Level
74+
import com.rosan.installer.build.RsConfig
7375
import com.rosan.installer.data.app.model.impl.DSRepoImpl
7476
import com.rosan.installer.data.settings.model.room.entity.ConfigEntity
7577
import com.rosan.installer.data.settings.util.ConfigUtil
@@ -94,6 +96,12 @@ fun PreferredPage(
9496
val state = viewModel.state
9597
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior()
9698

99+
val revLevel = when (RsConfig.LEVEL) {
100+
Level.STABLE -> stringResource(id = R.string.stable)
101+
Level.PREVIEW -> stringResource(id = R.string.preview)
102+
Level.UNSTABLE -> stringResource(id = R.string.unstable)
103+
}
104+
97105
LaunchedEffect(true) {
98106
viewModel.dispatch(PreferredViewAction.Init)
99107
}
@@ -167,7 +175,7 @@ fun PreferredPage(
167175
context = context,
168176
imageVector = Icons.TwoTone.Info,
169177
headlineContentText = stringResource(R.string.about_detail),
170-
supportingContentText = stringResource(R.string.about),
178+
supportingContentText = "$revLevel ${RsConfig.VERSION_NAME}",
171179
onClick = {
172180
val intent = Intent(context, AboutPageActivity::class.java)
173181
context.startActivity(intent)

0 commit comments

Comments
 (0)