diff options
author | fiaxh <git@lightrise.org> | 2022-02-01 17:38:15 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-02-01 23:37:54 +0100 |
commit | b7ca33a37de5dd2ecffa7575681c6009996b7ba2 (patch) | |
tree | 838f4e36a8052cd5d287069df7b76b7fbd6fb7bd /libdino/src/service/connection_manager.vala | |
parent | 1e63cb3bd935ad42af7b203efc5f4f83ae131e58 (diff) | |
download | dino-b7ca33a37de5dd2ecffa7575681c6009996b7ba2.tar.gz dino-b7ca33a37de5dd2ecffa7575681c6009996b7ba2.zip |
Initialize and use dbus interfaces async
related #1155
Diffstat (limited to 'libdino/src/service/connection_manager.vala')
-rw-r--r-- | libdino/src/service/connection_manager.vala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libdino/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala index d114b9ae..43580c06 100644 --- a/libdino/src/service/connection_manager.vala +++ b/libdino/src/service/connection_manager.vala @@ -104,10 +104,14 @@ public class ConnectionManager : Object { network_monitor.network_changed.connect(on_network_changed); network_monitor.notify["connectivity"].connect(on_network_changed); } - login1 = get_login1(); - if (login1 != null) { - login1.PrepareForSleep.connect(on_prepare_for_sleep); - } + + get_login1.begin((_, res) => { + login1 = get_login1.end(res); + if (login1 != null) { + login1.PrepareForSleep.connect(on_prepare_for_sleep); + } + }); + Timeout.add_seconds(60, () => { foreach (Account account in connections.keys) { if (connections[account].last_activity != null && |