diff options
author | Marvin W <git@larma.de> | 2019-09-10 20:56:00 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-09-16 23:31:11 +0200 |
commit | e899668213ee8f7d3566bb5754b488d8633c30c7 (patch) | |
tree | 30119a9068abed58ad692de8fcf5723c6e441de8 /main | |
parent | 87d64524c8e4397515be045901427e71b660134f (diff) | |
download | dino-e899668213ee8f7d3566bb5754b488d8633c30c7.tar.gz dino-e899668213ee8f7d3566bb5754b488d8633c30c7.zip |
Add JET support
Diffstat (limited to 'main')
-rw-r--r-- | main/src/ui/chat_input/view.vala | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala index 74fa044e..24297e6a 100644 --- a/main/src/ui/chat_input/view.vala +++ b/main/src/ui/chat_input/view.vala @@ -57,6 +57,7 @@ public class View : Box { scrolled.vadjustment.notify["upper"].connect_after(on_upper_notify); encryption_widget.get_style_context().add_class("dino-chatinput-button"); + encryption_widget.encryption_changed.connect(update_file_transfer_availability); // Emoji button for emoji picker (recents don't work < 3.22.19, category icons don't work <3.23.2) if (Gtk.get_major_version() >= 3 && Gtk.get_minor_version() >= 24) { @@ -83,15 +84,17 @@ public class View : Box { return this; } - public void initialize_for_conversation(Conversation conversation) { - + private void update_file_transfer_availability() { + bool upload_available = stream_interactor.get_module(FileManager.IDENTITY).is_upload_available(conversation); + file_button.visible = upload_available; + file_separator.visible = upload_available; + } + public void initialize_for_conversation(Conversation conversation) { if (this.conversation != null) entry_cache[this.conversation] = text_input.buffer.text; this.conversation = conversation; - bool upload_available = stream_interactor.get_module(FileManager.IDENTITY).is_upload_available(conversation); - file_button.visible = upload_available; - file_separator.visible = upload_available; + update_file_transfer_availability(); text_input.buffer.text = ""; if (entry_cache.has_key(conversation)) { |