Implement resync after update monitor reconnect
This commit is contained in:
@@ -6,6 +6,7 @@ public class Repository : DBusServiceProxy {
|
||||
public signal void messages_updated(string conversation_guid);
|
||||
public signal void attachment_downloaded(string attachment_guid);
|
||||
public signal void attachment_uploaded(string upload_guid, string attachment_guid);
|
||||
public signal void reconnected();
|
||||
|
||||
public static Repository get_instance() {
|
||||
if (instance == null) {
|
||||
@@ -46,11 +47,24 @@ public class Repository : DBusServiceProxy {
|
||||
attachment_uploaded(upload_guid, attachment_guid);
|
||||
});
|
||||
|
||||
this.dbus_repository.update_stream_reconnected.connect(() => {
|
||||
reconnected();
|
||||
});
|
||||
|
||||
conversations_updated();
|
||||
reconnected();
|
||||
} catch (GLib.Error e) {
|
||||
warning("Failed to connect to repository: %s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public void sync_conversation_list() throws DBusServiceProxyError, GLib.Error {
|
||||
if (dbus_repository == null) {
|
||||
throw new DBusServiceProxyError.NOT_CONNECTED("Repository not connected");
|
||||
}
|
||||
|
||||
dbus_repository.sync_conversation_list();
|
||||
}
|
||||
|
||||
public Conversation[] get_conversations(int limit = 200) throws DBusServiceProxyError, GLib.Error {
|
||||
if (dbus_repository == null) {
|
||||
|
||||
Reference in New Issue
Block a user