Weather widget: hide humidity if value is -1
This commit is contained in:
parent
7b6ff6e6eb
commit
97e714acf4
@ -158,10 +158,12 @@ fun CurrentWeather(forecast: Forecast, imperialUnits: Boolean) {
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
WeatherDetailRow(
|
if (forecast.humidity >= 0) {
|
||||||
title = stringResource(id = R.string.weather_humidity),
|
WeatherDetailRow(
|
||||||
value = "${forecast.humidity.roundToInt()} %"
|
title = stringResource(id = R.string.weather_humidity),
|
||||||
)
|
value = "${forecast.humidity.roundToInt()} %"
|
||||||
|
)
|
||||||
|
}
|
||||||
WeatherDetailRow(
|
WeatherDetailRow(
|
||||||
title = stringResource(id = R.string.weather_wind),
|
title = stringResource(id = R.string.weather_wind),
|
||||||
value = formatWindSpeed(imperialUnits, forecast)
|
value = formatWindSpeed(imperialUnits, forecast)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user