mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
fix: remove useFahrenheit refresh, fetch Celcius convert locally (#785)
* fix: remove useFahrenheit refresh, fetch Celcius convert locally * fix: typo in change unit button
This commit is contained in:
@@ -139,7 +139,7 @@ Item {
|
|||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (WeatherService.weather.available) {
|
if (WeatherService.weather.available) {
|
||||||
SettingsData.set("temperatureUnit", !SettingsData.useFahrenheit)
|
SettingsData.set("useFahrenheit", !SettingsData.useFahrenheit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enabled: WeatherService.weather.available
|
enabled: WeatherService.weather.available
|
||||||
@@ -656,4 +656,4 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,10 +190,6 @@ Singleton {
|
|||||||
"forecast_days=7"
|
"forecast_days=7"
|
||||||
]
|
]
|
||||||
|
|
||||||
if (SettingsData.useFahrenheit) {
|
|
||||||
params.push("temperature_unit=fahrenheit")
|
|
||||||
}
|
|
||||||
|
|
||||||
return "https://api.open-meteo.com/v1/forecast?" + params.join('&')
|
return "https://api.open-meteo.com/v1/forecast?" + params.join('&')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -630,11 +626,6 @@ Singleton {
|
|||||||
root.forceRefresh()
|
root.forceRefresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
SettingsData.useFahrenheitChanged.connect(() => {
|
|
||||||
root.lastFetchTime = 0
|
|
||||||
root.forceRefresh()
|
|
||||||
})
|
|
||||||
|
|
||||||
SettingsData.weatherEnabledChanged.connect(() => {
|
SettingsData.weatherEnabledChanged.connect(() => {
|
||||||
if (SettingsData.weatherEnabled && root.refCount > 0 && !root.weather.available) {
|
if (SettingsData.weatherEnabled && root.refCount > 0 && !root.weather.available) {
|
||||||
root.forceRefresh()
|
root.forceRefresh()
|
||||||
|
|||||||
Reference in New Issue
Block a user