plugins/nightcolor: fix wrong transition time update in location mode
BUG: 412211
This commit is contained in:
parent
ae05d5e654
commit
e840617047
1 changed files with 7 additions and 5 deletions
|
@ -548,14 +548,16 @@ void NightColorManager::updateTransitionTimings(bool force)
|
||||||
|
|
||||||
if (!force) {
|
if (!force) {
|
||||||
// first try by only switching the timings
|
// first try by only switching the timings
|
||||||
if (daylight()) {
|
if (m_prev.first.date() == m_next.first.date()) {
|
||||||
// next is morning
|
|
||||||
m_prev = m_next;
|
|
||||||
m_next = getSunTimings(todayNow.addDays(1), lat, lng, true);
|
|
||||||
} else {
|
|
||||||
// next is evening
|
// next is evening
|
||||||
|
m_daylight = true;
|
||||||
m_prev = m_next;
|
m_prev = m_next;
|
||||||
m_next = getSunTimings(todayNow, lat, lng, false);
|
m_next = getSunTimings(todayNow, lat, lng, false);
|
||||||
|
} else {
|
||||||
|
// next is morning
|
||||||
|
m_daylight = false;
|
||||||
|
m_prev = m_next;
|
||||||
|
m_next = getSunTimings(todayNow.addDays(1), lat, lng, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue