Private
Public Access
1
0

Implement resync after update monitor reconnect

This commit is contained in:
2025-06-13 17:13:04 -07:00
parent 1420d96a20
commit 741932c67d
6 changed files with 53 additions and 6 deletions

View File

@@ -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) {