diff --git a/src/mconnect/application.vala b/src/mconnect/application.vala index 5e1aa6c..4dc9a41 100644 --- a/src/mconnect/application.vala +++ b/src/mconnect/application.vala @@ -71,6 +71,8 @@ namespace Mconn { protected override void activate() { debug("activate"); + // reload devices from cache + manager.load_cache(); hold(); } diff --git a/src/mconnect/devicemanager.vala b/src/mconnect/devicemanager.vala index 37f5c6c..a07a34e 100644 --- a/src/mconnect/devicemanager.vala +++ b/src/mconnect/devicemanager.vala @@ -44,10 +44,6 @@ class DeviceManager : GLib.Object debug("device manager.."); this.devices = new HashMap(); - - // TODO: check for network connectivity first, possibly pass - // this through the main loop - load_cache(); } /** @@ -68,7 +64,8 @@ class DeviceManager : GLib.Object /** * Load known devices from cache and attempt pairing. */ - private void load_cache() { + [DBus (visible = false)] + public void load_cache() { debug("try loading devices from device cache"); var cache_file = get_cache_file();