Finish daemon support for uploaded attachments + sending
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user