Fix inverted temperature unit in forecast widget (#78)
This commit is contained in:
parent
d17bf507d4
commit
31610773cb
@ -298,7 +298,7 @@ abstract class ForecastDataType(private val karooSystem: KarooSystemService, typ
|
|||||||
precipitation = data.current.precipitation,
|
precipitation = data.current.precipitation,
|
||||||
precipitationProbability = null,
|
precipitationProbability = null,
|
||||||
temperature = data.current.temperature.roundToInt(),
|
temperature = data.current.temperature.roundToInt(),
|
||||||
temperatureUnit = if (settingsAndProfile.isImperialTemperature) TemperatureUnit.CELSIUS else TemperatureUnit.FAHRENHEIT,
|
temperatureUnit = if (settingsAndProfile.isImperialTemperature) TemperatureUnit.FAHRENHEIT else TemperatureUnit.CELSIUS,
|
||||||
timeLabel = formattedTime,
|
timeLabel = formattedTime,
|
||||||
dateLabel = if (hasNewDate) formattedDate else null,
|
dateLabel = if (hasNewDate) formattedDate else null,
|
||||||
distance = null,
|
distance = null,
|
||||||
@ -333,7 +333,7 @@ abstract class ForecastDataType(private val karooSystem: KarooSystemService, typ
|
|||||||
) ?: 0,
|
) ?: 0,
|
||||||
temperature = data?.forecastData?.temperature?.get(baseIndex)
|
temperature = data?.forecastData?.temperature?.get(baseIndex)
|
||||||
?.roundToInt() ?: 0,
|
?.roundToInt() ?: 0,
|
||||||
temperatureUnit = if (settingsAndProfile.isImperialTemperature) TemperatureUnit.CELSIUS else TemperatureUnit.FAHRENHEIT,
|
temperatureUnit = if (settingsAndProfile.isImperialTemperature) TemperatureUnit.FAHRENHEIT else TemperatureUnit.CELSIUS,
|
||||||
timeLabel = formattedTime,
|
timeLabel = formattedTime,
|
||||||
dateLabel = if (hasNewDate) formattedDate else null,
|
dateLabel = if (hasNewDate) formattedDate else null,
|
||||||
distance = if (settingsAndProfile.settings.showDistanceInForecast) distanceFromCurrent else null,
|
distance = if (settingsAndProfile.settings.showDistanceInForecast) distanceFromCurrent else null,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user