Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemUpdate: Move offline trigger to end session dialog #155

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/Backends/SystemUpdate.vala
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {

update_state (CHECKING);

try {
var prepared = Pk.offline_get_prepared_ids ().length > 0;

if (prepared) {
update_state (RESTART_REQUIRED);
return;
}
} catch (Error e) {
warning ("Failed to get offline prepared ids: %s", e.message);
}

try {
yield task.refresh_cache_async (force, null, progress_callback);
} catch (Error e) {
Expand Down Expand Up @@ -152,8 +163,6 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {
return;
}

Pk.offline_trigger (REBOOT);

var notification = new Notification (_("Restart required"));
notification.set_body (_("Please restart your system to finalize updates"));
notification.set_icon (new ThemedIcon ("system-reboot"));
Expand Down