diff --git a/Modules/Cards/WeatherCard.qml b/Modules/Cards/WeatherCard.qml index 4e88c5107..ba6686f80 100644 --- a/Modules/Cards/WeatherCard.qml +++ b/Modules/Cards/WeatherCard.qml @@ -117,7 +117,7 @@ NBox { NIcon { visible: !LocationService.taliaWeatherMascotActive || !weatherReady anchors.centerIn: parent - icon: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode, LocationService.data.weather.current_weather.is_day) : "weather-cloud-off" + icon: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode) : "weather-cloud-off" pointSize: Style.fontSizeXXXL * 1.75 color: Color.mPrimary } @@ -132,7 +132,7 @@ NBox { smooth: true mipmap: true asynchronous: true - source: Qt.resolvedUrl(LocationService.taliaWeatherImageFromCode(currentWeatherCode, isDayTime)) + source: Qt.resolvedUrl(LocationService.taliaWeatherImageFromCode(currentWeatherCode)) } } } diff --git a/Modules/DesktopWidgets/Widgets/DesktopWeather.qml b/Modules/DesktopWidgets/Widgets/DesktopWeather.qml index 81f3a1dd8..eb7906b46 100644 --- a/Modules/DesktopWidgets/Widgets/DesktopWeather.qml +++ b/Modules/DesktopWidgets/Widgets/DesktopWeather.qml @@ -64,7 +64,7 @@ DraggableDesktopWidget { NIcon { visible: !LocationService.taliaWeatherMascotActive || !weatherReady anchors.centerIn: parent - icon: weatherReady ? LocationService.weatherSymbolFromCode(currentWeatherCode, LocationService.data.weather.current_weather.is_day) : "weather-cloud-off" + icon: weatherReady ? LocationService.weatherSymbolFromCode(currentWeatherCode) : "weather-cloud-off" pointSize: Math.round(Style.fontSizeXXXL * 2 * widgetScale) color: weatherReady ? Color.mPrimary : Color.mOnSurfaceVariant } @@ -79,7 +79,7 @@ DraggableDesktopWidget { smooth: true mipmap: true asynchronous: true - source: Qt.resolvedUrl(LocationService.taliaWeatherImageFromCode(currentWeatherCode, LocationService.data.weather.current_weather.is_day)) + source: Qt.resolvedUrl(LocationService.taliaWeatherImageFromCode(currentWeatherCode)) } } } diff --git a/Modules/LockScreen/LockScreenPanel.qml b/Modules/LockScreen/LockScreenPanel.qml index af4056f5f..ddd0678c4 100644 --- a/Modules/LockScreen/LockScreenPanel.qml +++ b/Modules/LockScreen/LockScreenPanel.qml @@ -497,7 +497,7 @@ Item { NIcon { visible: !LocationService.taliaWeatherMascotActive || !weatherReady anchors.centerIn: parent - icon: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode, LocationService.data.weather.current_weather.is_day) : "weather-cloud-off" + icon: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode) : "weather-cloud-off" pointSize: Style.fontSizeXXXL color: Color.mPrimary } @@ -512,7 +512,7 @@ Item { smooth: true mipmap: true asynchronous: true - source: Qt.resolvedUrl(LocationService.taliaWeatherImageFromCode(LocationService.data.weather.current_weather.weathercode, LocationService.data.weather.current_weather.is_day)) + source: Qt.resolvedUrl(LocationService.taliaWeatherImageFromCode(LocationService.data.weather.current_weather.weathercode)) } } } diff --git a/Services/Location/LocationService.qml b/Services/Location/LocationService.qml index 6c166f3a6..e87d9dc37 100644 --- a/Services/Location/LocationService.qml +++ b/Services/Location/LocationService.qml @@ -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)