Private
Public Access
1
0

Implements attachments display in transcript

This commit is contained in:
2025-06-06 20:03:02 -07:00
parent 1a2dad08a5
commit 54790d1d70
9 changed files with 252 additions and 31 deletions

View File

@@ -4,6 +4,7 @@ using Gee;
public class Repository : DBusServiceProxy {
public signal void conversations_updated();
public signal void messages_updated(string conversation_guid);
public signal void attachment_downloaded(string attachment_guid);
public static Repository get_instance() {
if (instance == null) {
@@ -36,6 +37,10 @@ public class Repository : DBusServiceProxy {
messages_updated(conversation_guid);
});
this.dbus_repository.attachment_download_completed.connect((attachment_guid) => {
attachment_downloaded(attachment_guid);
});
conversations_updated();
} catch (GLib.Error e) {
warning("Failed to connect to repository: %s", e.message);
@@ -87,4 +92,12 @@ public class Repository : DBusServiceProxy {
dbus_repository.sync_conversation(conversation_guid);
}
public void download_attachment(string attachment_guid, bool preview) throws DBusServiceProxyError, GLib.Error {
if (dbus_repository == null) {
throw new DBusServiceProxyError.NOT_CONNECTED("Repository not connected");
}
dbus_repository.download_attachment(attachment_guid, preview);
}
}