mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(weather): read is_day from service instead of requiring callers to pass it.
This commit is contained in:
@@ -322,7 +322,8 @@ Singleton {
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
function weatherSymbolFromCode(code, isDay) {
|
||||
function weatherSymbolFromCode(code) {
|
||||
var isDay = data.weather ? data.weather.current_weather.is_day : true;
|
||||
if (code === 0)
|
||||
return isDay ? "weather-sun" : "weather-moon";
|
||||
if (code === 1 || code === 2)
|
||||
@@ -347,7 +348,8 @@ Singleton {
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
function taliaWeatherImageFromCode(code, isDay) {
|
||||
function taliaWeatherImageFromCode(code) {
|
||||
var isDay = data.weather ? data.weather.current_weather.is_day : true;
|
||||
if (code >= 40 && code <= 49)
|
||||
return Quickshell.shellDir + "/Assets/Talia/TaliaDazed.png";
|
||||
if (code >= 95 && code <= 99)
|
||||
|
||||
Reference in New Issue
Block a user