This commit was merged in pull request #52.
This commit is contained in:
@@ -240,12 +240,19 @@ private fun MainScaffold(
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
var isDark by LocalThemeIsDark.current
|
||||
val currentRoute = currentRoute(navController)
|
||||
|
||||
val topBarTitle = when (currentRoute) {
|
||||
AppRoutes.CHARACTER_SHEET -> EXAMPLE_CHARACTER.characterData.name
|
||||
AppRoutes.SETTINGS -> "Settings"
|
||||
else -> "Shadowrun Character Sheet"
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
modifier = modifier.fillMaxSize(),
|
||||
topBar = {
|
||||
TopAppBar(
|
||||
title = { Text("Shadowrun Character Sheet") },
|
||||
title = { Text(topBarTitle) },
|
||||
modifier = Modifier.testTag(TestTags.TOP_APP_BAR),
|
||||
navigationIcon = {
|
||||
if (showMenuButton) {
|
||||
|
||||
Reference in New Issue
Block a user