Commit e8406170 authored by Natalie Clarius's avatar Natalie Clarius Committed by Vlad Zahorodnii
Browse files

plugins/nightcolor: fix wrong transition time update in location mode

BUG: 412211
parent ae05d5e6
Pipeline #224517 passed with stage
in 14 minutes and 38 seconds
......@@ -548,14 +548,16 @@ void NightColorManager::updateTransitionTimings(bool force)
if (!force) {
// first try by only switching the timings
if (daylight()) {
// next is morning
m_prev = m_next;
m_next = getSunTimings(todayNow.addDays(1), lat, lng, true);
} else {
if (m_prev.first.date() == m_next.first.date()) {
// next is evening
m_daylight = true;
m_prev = m_next;
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);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment