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"
minSdk = 26
targetSdk = 35
versionCode = 36
versionName = "1.0.35"
versionCode = 37
versionName = "1.0.36"
setProperty("archivesBaseName", "pl.firmatpp.kierowca")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -563,7 +563,17 @@ private fun RoutesScreen(
val compactWidth = screenWidthDp < 360
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 = {
StitchBottomBar(
activeScreen = DriverScreen.Routes,
@@ -608,7 +618,6 @@ private fun RoutesScreen(
}
}
}
item { RouteDayLiveUpdateBanner(state.routeDayLiveUpdateMessage) }
item {
RouteDateSelector(
selectedDate = state.selectedDate,
@@ -639,14 +648,14 @@ private fun RoutesScreen(
}
@Composable
private fun RouteDayLiveUpdateBanner(message: String?) {
private fun RouteDayLiveUpdateBanner(message: String?, modifier: Modifier = Modifier) {
if (message.isNullOrBlank()) return
Card(
colors = CardDefaults.cardColors(containerColor = Color(0xFFEAF7EF)),
border = BorderStroke(1.dp, Color(0xFF9BD1AD)),
shape = RoundedCornerShape(8.dp),
modifier = Modifier.fillMaxWidth(),
modifier = modifier.fillMaxWidth(),
) {
Row(
Modifier.fillMaxWidth().padding(14.dp),