mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-22 02:52:37 -05:00
update wind speed validation to support daily forecasts in WeatherBlocks.kt
This commit is contained in:
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
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user