diff --git a/app/src/main/java/com/chaser/paintballnotificator/MainActivity.kt b/app/src/main/java/com/chaser/paintballnotificator/MainActivity.kt index 40d032b..870ead5 100644 --- a/app/src/main/java/com/chaser/paintballnotificator/MainActivity.kt +++ b/app/src/main/java/com/chaser/paintballnotificator/MainActivity.kt @@ -39,11 +39,14 @@ import androidx.compose.material.icons.rounded.Refresh import androidx.compose.material.icons.rounded.Share import androidx.compose.material3.Button import androidx.compose.material3.Card +import androidx.compose.material3.CenterAlignedTopAppBar import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.LargeTopAppBar import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.MediumTopAppBar import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.Scaffold import androidx.compose.material3.Surface @@ -400,6 +403,7 @@ class MainActivity : ComponentActivity() { ) { Text( text = stringResource(R.string.match_id, gameId.value), + maxLines = 1, color = MaterialTheme.colorScheme.onPrimary ) IconButton(onClick = { setRandomGameId() }) { @@ -542,31 +546,38 @@ class MainActivity : ComponentActivity() { ) { Scaffold( topBar = { - TopAppBar( - colors = TopAppBarDefaults.topAppBarColors( - containerColor = MaterialTheme.colorScheme.primary, - titleContentColor = MaterialTheme.colorScheme.onPrimary, - ), - title = { - TeamSelector() - }, - actions = { - if (connecting.value) { - CircularProgressIndicator( -// modifier = Modifier.width(64.dp), - color = MaterialTheme.colorScheme.onPrimary, - trackColor = MaterialTheme.colorScheme.primary, - ) - } - else { - Row (verticalAlignment = Alignment.CenterVertically) { + if (gameId.value != "") { + MediumTopAppBar( + colors = TopAppBarDefaults.topAppBarColors( + containerColor = MaterialTheme.colorScheme.primary, + titleContentColor = MaterialTheme.colorScheme.onPrimary, + ), + title = { + Row (modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) { + TeamSelector() + } + }, + navigationIcon = { + if (!connecting.value) { GameSelector() + } + }, + actions = { + if (connecting.value) { + if (gameId.value != "") { + CircularProgressIndicator( + color = MaterialTheme.colorScheme.onPrimary, + trackColor = MaterialTheme.colorScheme.primary, + ) + } + } + else { ShareButton() } } - } - ) - }, + ) + } + } ) { innerPadding -> if (gameId.value != "") { LazyColumn( diff --git a/app/version.properties b/app/version.properties index d39e96c..12261b8 100644 --- a/app/version.properties +++ b/app/version.properties @@ -1 +1 @@ -VERSION=1.1.4 \ No newline at end of file +VERSION=1.2.0 \ No newline at end of file diff --git a/fastlane/metadata/android/de-DE/changelogs/10200.txt b/fastlane/metadata/android/de-DE/changelogs/10200.txt new file mode 100644 index 0000000..99c519d --- /dev/null +++ b/fastlane/metadata/android/de-DE/changelogs/10200.txt @@ -0,0 +1,2 @@ +v1.2.0: + - Header refactored \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/10200.txt b/fastlane/metadata/android/en-US/changelogs/10200.txt new file mode 100644 index 0000000..99c519d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/10200.txt @@ -0,0 +1,2 @@ +v1.2.0: + - Header refactored \ No newline at end of file