Commit 556ab9b9 authored by Fabian Vogt's avatar Fabian Vogt
Browse files

notifier: Update lastUnattendedTrigger before checking for updates again

After the update process finishes, notifier->setBusy(false) triggers
checkNewState, which might end up triggering the next update immediately.
Update lastUnattendedTrigger before that happens to avoid skipping the delay.

(cherry picked from commit 83bd0a0c)
parent eb810468
......@@ -74,10 +74,10 @@ void UnattendedUpdates::triggerUpdate(int timeoutId)
connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this, process](int exitCode, QProcess::ExitStatus exitStatus) {
qDebug() << "Finished running plasma-discover-update" << exitCode << exitStatus;
DiscoverNotifier *notifier = static_cast<DiscoverNotifier *>(parent());
notifier->setBusy(false);
process->deleteLater();
notifier->settings()->setLastUnattendedTrigger(QDateTime::currentDateTimeUtc());
notifier->settings()->save();
notifier->setBusy(false);
});
notifier->setBusy(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