aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/application.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-11-04 17:35:11 +0100
committerfiaxh <git@lightrise.org>2021-11-10 11:05:34 +0100
commit3dc4d7f1558bb574eb99dade9a05727604e2e2ca (patch)
treea936dede1f2f41a27d7931ee7f668ef85deaa93b /main/src/ui/application.vala
parent26d10d1dcb95f11b65611473c9840e13683cb5ec (diff)
downloaddino-3dc4d7f1558bb574eb99dade9a05727604e2e2ca.tar.gz
dino-3dc4d7f1558bb574eb99dade9a05727604e2e2ca.zip
Add (disabled) multi-party call UI
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r--main/src/ui/application.vala14
1 files changed, 10 insertions, 4 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index bed6d01b..9f48caec 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -209,18 +209,24 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
SimpleAction accept_call_action = new SimpleAction("accept-call", VariantType.INT32);
accept_call_action.activate.connect((variant) => {
Call? call = stream_interactor.get_module(CallStore.IDENTITY).get_call_by_id(variant.get_int32());
- stream_interactor.get_module(Calls.IDENTITY).accept_call(call);
+ CallState? call_state = stream_interactor.get_module(Calls.IDENTITY).call_states[call];
+ if (call_state == null) return;
+
+ call_state.accept();
var call_window = new CallWindow();
- call_window.controller = new CallWindowController(call_window, call, stream_interactor);
+ call_window.controller = new CallWindowController(call_window, call_state, stream_interactor);
call_window.present();
});
add_action(accept_call_action);
- SimpleAction deny_call_action = new SimpleAction("deny-call", VariantType.INT32);
+ SimpleAction deny_call_action = new SimpleAction("reject-call", VariantType.INT32);
deny_call_action.activate.connect((variant) => {
Call? call = stream_interactor.get_module(CallStore.IDENTITY).get_call_by_id(variant.get_int32());
- stream_interactor.get_module(Calls.IDENTITY).reject_call(call);
+ CallState? call_state = stream_interactor.get_module(Calls.IDENTITY).call_states[call];
+ if (call_state == null) return;
+
+ call_state.reject();
});
add_action(deny_call_action);
}