aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-02-02 21:37:05 +0100
committerfiaxh <git@lightrise.org>2022-02-07 01:21:11 +0100
commit4ef50db3e581016365087759d5af8649e37ab8a7 (patch)
treeec7d47401f8424b5b9999941e05f61409594c539 /main/src/ui/conversation_titlebar
parent5ed8d28a27948ed949eb80b0da06d2c4ec9571ff (diff)
downloaddino-4ef50db3e581016365087759d5af8649e37ab8a7.tar.gz
dino-4ef50db3e581016365087759d5af8649e37ab8a7.zip
Various call UI/UX improvements
Diffstat (limited to 'main/src/ui/conversation_titlebar')
-rw-r--r--main/src/ui/conversation_titlebar/call_entry.vala16
1 files changed, 5 insertions, 11 deletions
diff --git a/main/src/ui/conversation_titlebar/call_entry.vala b/main/src/ui/conversation_titlebar/call_entry.vala
index 3b3a5b39..e5b7281c 100644
--- a/main/src/ui/conversation_titlebar/call_entry.vala
+++ b/main/src/ui/conversation_titlebar/call_entry.vala
@@ -115,17 +115,11 @@ namespace Dino.Ui {
return;
}
- if (conversation.type_ == Conversation.Type.CHAT) {
- Conversation conv_bak = conversation;
- bool audio_works = yield stream_interactor.get_module(Calls.IDENTITY).can_do_audio_calls_async(conversation);
- bool video_works = yield stream_interactor.get_module(Calls.IDENTITY).can_do_video_calls_async(conversation);
- if (conv_bak != conversation) return;
-
- visible = audio_works;
- video_button.visible = video_works;
- } else {
- visible = false;
- }
+ Conversation conv_bak = conversation;
+ bool can_do_calls = yield stream_interactor.get_module(Calls.IDENTITY).can_conversation_do_calls(conversation);
+ if (conv_bak != conversation) return;
+
+ visible = video_button.visible = can_do_calls;
}
public new void unset_conversation() { }