Skip to content
Closed
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
7 changes: 6 additions & 1 deletion src/Backends/SystemUpdate.vala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {

private const string NOTIFICATION_ID = "system-update";

private const int DELAY_INITIAL_CHECK_SECONDS = 60;

public signal void state_changed ();

private static Settings settings = new GLib.Settings ("io.elementary.settings-daemon.system-update");
Expand Down Expand Up @@ -58,7 +60,10 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {
warning ("Couldn't determine last offline results: %s", e.message);
}

check_for_updates.begin (false, true);
Timeout.add_seconds (DELAY_INITIAL_CHECK_SECONDS, () => {
check_for_updates.begin (true, true);
return Source.REMOVE;
});

Timeout.add_seconds ((uint) settings.get_int64 ("refresh-interval"), () => {
check_for_updates.begin (false, true);
Expand Down