Location: should fix edge case of location data being not ready on time

This commit is contained in:
LemmyCook 2025-08-31 10:24:01 -04:00
parent 3f0374e1f2
commit 6ecbdda121
6 changed files with 51 additions and 45 deletions

View file

@ -31,7 +31,7 @@ Singleton {
var cmd = ["wlsunset"]
cmd.push("-t", `${params.nightTemp}`, "-T", `${params.dayTemp}`)
if (params.autoSchedule) {
cmd.push("-l", `${LocationService.data.stableLatitude}`, "-L", `${LocationService.data.stableLongitude}`)
cmd.push("-l", `${LocationService.stableLatitude}`, "-L", `${LocationService.stableLongitude}`)
} else {
cmd.push("-S", params.manualSunrise)
cmd.push("-s", params.manualSunset)
@ -55,9 +55,11 @@ Singleton {
}
Connections {
target: LocationService.data
target: LocationService
function onCoordinatesReadyChanged() {
apply()
if (LocationService.coordinatesReady) {
apply()
}
}
}