Merge pull request #30509 from nextcloud/weather-round-temperature

Integer temperatures in weather widget
pull/30511/head
Julien Veyssier 2022-01-06 16:07:05 +07:00 committed by GitHub
commit 9b2e60e2d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -462,7 +462,7 @@ export default {
},
getLocalizedTemperature(celcius) {
return this.useFahrenheitLocale
? ((celcius * (9 / 5)) + 32).toFixed(1)
? (celcius * (9 / 5)) + 32
: celcius
},
onAddRemoveFavoriteClick() {
@ -511,7 +511,7 @@ export default {
getWeatherMessage(weatherCode, temperature, later = false) {
return weatherCode && weatherCode in weatherOptions
? weatherOptions[weatherCode].text(
this.getLocalizedTemperature(temperature),
Math.round(this.getLocalizedTemperature(temperature)),
this.temperatureUnit,
later
)