Location: should fix edge case of location data being not ready on time
This commit is contained in:
parent
3f0374e1f2
commit
6ecbdda121
6 changed files with 51 additions and 45 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue