Modern Apps git

← Modern-Apps.git

weather: wind shows gusts only (1 line); precip nowcast 'No rain for 2 hours'

Commit
3b8204f112f0a72f722f0a73806ab46ea320da95
Author
vayun-mathur <[email protected]>
When
2026-08-16 03:33 UTC (3 months ago)
Parents
ca2e59b

Diff

weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/WindBlock.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/WindBlock.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/WindBlock.ktindex 5c5d8acbd3..5e407cdc7f 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/WindBlock.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/WindBlock.kt@@ -23,7 +23,6 @@ import androidx.compose.ui.unit.dp import com.vayunmathur.weather.R import com.vayunmathur.weather.network.Current import com.vayunmathur.weather.domain.WindUnit-import com.vayunmathur.weather.domain.compassDirection import com.vayunmathur.weather.domain.formatWind import androidx.compose.ui.res.stringResource @@ -70,15 +69,14 @@ fun WindBlock(current: Current, unit: WindUnit) {                 )             }             Text(-                text = stringResource(R.string.from_gusts, compassDirection(current.windDirection), formatWind(current.windGusts, unit)),+                text = stringResource(R.string.gusts, formatWind(current.windGusts, unit)),                 style = MaterialTheme.typography.bodyMedium,                 modifier = Modifier                     .fillMaxWidth()                     .padding(bottom = 20.dp)                     .padding(horizontal = 16.dp),                 textAlign = TextAlign.Center,-                maxLines = 2,-                softWrap = true,+                maxLines = 1,                 color = MaterialTheme.colorScheme.onSurfaceVariant,             )         }
weather/src/main/res/values/strings.xml
diff --git a/weather/src/main/res/values/strings.xml b/weather/src/main/res/values/strings.xmlindex 79bf723b8e..b20a304690 100644--- a/weather/src/main/res/values/strings.xml+++ b/weather/src/main/res/values/strings.xml@@ -183,7 +183,9 @@     <!-- Precipitation nowcast: raining now -->     <string name="precip_raining_now">Raining now</string>     <!-- Precipitation nowcast: no rain in next 2 hours -->-    <string name="precip_no_rain_next_2h">No rain in the next 2 hours</string>+    <string name="precip_no_rain_next_2h">No rain for 2 hours</string>+    <!-- WindBlock: gusts-only detail line. %1$s = gusts speed e.g. 18 km/h -->+    <string name="gusts">Gusts <xliff:g id="gusts" example="18 km/h">%1$s</xliff:g></string>     <!-- Precipitation nowcast: rain starting now -->     <string name="precip_rain_starting_now">Rain starting now</string>     <!-- Precipitation nowcast: rain expected in ~N minutes. %1$d = rounded minutes -->