diff --git a/src/Backends/SystemUpdate.vala b/src/Backends/SystemUpdate.vala index 4a110f47..a5d6b9d9 100644 --- a/src/Backends/SystemUpdate.vala +++ b/src/Backends/SystemUpdate.vala @@ -25,6 +25,7 @@ public class SettingsDaemon.Backends.SystemUpdate : Object { private Pk.Task task; private Pk.PackageSack? available_updates = null; private GLib.Cancellable cancellable; + private GLib.FileMonitor? prepared_update_monitor = null; construct { current_state = { @@ -58,6 +59,13 @@ public class SettingsDaemon.Backends.SystemUpdate : Object { } catch (Error e) { warning ("Couldn't determine last offline results: %s", e.message); } + + try { + prepared_update_monitor = Pk.offline_get_prepared_monitor (); + prepared_update_monitor.changed.connect (() => check_for_updates.begin (true, true)); + } catch (Error e) { + warning ("Couldn't monitor prepared offline updates: %s", e.message); + } } public async void check_for_updates (bool force, bool notify) throws DBusError, IOError {