Private
Public Access
1
0

Finish daemon support for uploaded attachments + sending

This commit is contained in:
2025-06-12 19:46:53 -07:00
parent f3e59b9951
commit 137da5b3d1
5 changed files with 23 additions and 7 deletions

View File

@@ -34,6 +34,12 @@ class TranscriptContainerView : Adw.Bin
}
}
private bool can_send {
get {
return (message_entry.text.length > 0 || completed_attachments.size > 0) && pending_uploads.size == 0;
}
}
public TranscriptContainerView () {
container = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
set_child (container);
@@ -183,11 +189,11 @@ class TranscriptContainerView : Adw.Bin
}
private void update_send_button_sensitivity() {
send_button.set_sensitive(message_entry.text.length > 0 && pending_uploads.size == 0);
send_button.set_sensitive(can_send);
}
private void on_request_send() {
if (message_entry.text.length > 0 && pending_uploads.size == 0) {
if (can_send) {
on_send(this);
// Clear the message entry