update wind speed validation to support daily forecasts in WeatherBlocks.kt

This commit is contained in:
PranshulGG committed 2026-06-12 16:30:27 +05:30
1 parent a6c512ccbf
commit 1c534f1d10
2 files changed
+3 -1

No files matched your search

@@ -249,6 +249,7 @@ class WeatherViewModel @Inject constructor(
SnackbarManager.show(appExpectation.toMessageRes())
_uiState.value = _uiState.value.copy(
isError = true,
weather = result.cacheWeather
@@ -94,7 +94,8 @@ fun WeatherBlocks(
val isPressureValid = weather.current.isPressureValid()
val isVisibilityValid = weather.current.isVisibilityValid()
val isWindValid = weather.current.isWindSpeedValid()
val isWindValid =
if (isDaily) weather.daily[dailyIndex].isWindSpeedValid() else weather.current.isWindSpeedValid()
val prefs = LocalAppPrefs.current