Pin live update toast over routes

This commit is contained in:
admin
2026-07-02 16:29:49 +02:00
parent 0e15d5f9a4
commit e0115e85fc
2 changed files with 15 additions and 6 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ android {
applicationId = "pl.firmatpp.kierowca" applicationId = "pl.firmatpp.kierowca"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 36 versionCode = 37
versionName = "1.0.35" versionName = "1.0.36"
setProperty("archivesBaseName", "pl.firmatpp.kierowca") setProperty("archivesBaseName", "pl.firmatpp.kierowca")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -563,7 +563,17 @@ private fun RoutesScreen(
val compactWidth = screenWidthDp < 360 val compactWidth = screenWidthDp < 360
Scaffold( Scaffold(
topBar = { StitchHeader(height = appBrandHeaderHeightDp(screenHeightDp).dp) }, topBar = {
Box(Modifier.fillMaxWidth()) {
StitchHeader(height = appBrandHeaderHeightDp(screenHeightDp).dp)
RouteDayLiveUpdateBanner(
message = state.routeDayLiveUpdateMessage,
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(horizontal = horizontalPadding, vertical = 10.dp),
)
}
},
bottomBar = { bottomBar = {
StitchBottomBar( StitchBottomBar(
activeScreen = DriverScreen.Routes, activeScreen = DriverScreen.Routes,
@@ -608,7 +618,6 @@ private fun RoutesScreen(
} }
} }
} }
item { RouteDayLiveUpdateBanner(state.routeDayLiveUpdateMessage) }
item { item {
RouteDateSelector( RouteDateSelector(
selectedDate = state.selectedDate, selectedDate = state.selectedDate,
@@ -639,14 +648,14 @@ private fun RoutesScreen(
} }
@Composable @Composable
private fun RouteDayLiveUpdateBanner(message: String?) { private fun RouteDayLiveUpdateBanner(message: String?, modifier: Modifier = Modifier) {
if (message.isNullOrBlank()) return if (message.isNullOrBlank()) return
Card( Card(
colors = CardDefaults.cardColors(containerColor = Color(0xFFEAF7EF)), colors = CardDefaults.cardColors(containerColor = Color(0xFFEAF7EF)),
border = BorderStroke(1.dp, Color(0xFF9BD1AD)), border = BorderStroke(1.dp, Color(0xFF9BD1AD)),
shape = RoundedCornerShape(8.dp), shape = RoundedCornerShape(8.dp),
modifier = Modifier.fillMaxWidth(), modifier = modifier.fillMaxWidth(),
) { ) {
Row( Row(
Modifier.fillMaxWidth().padding(14.dp), Modifier.fillMaxWidth().padding(14.dp),