diff options
author | fiaxh <git@lightrise.org> | 2021-05-11 12:57:02 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-05-11 12:57:02 +0200 |
commit | d71604913dd5b3372a823320db83c37c845fac5c (patch) | |
tree | 2ffbff97a02c81d48d8aef4a4b7ee870507236e9 /main/src/ui/application.vala | |
parent | e92ed27317ae398c867c946cf7206b1f0b32f3b4 (diff) | |
parent | 90f9ecf62b2ebfef14de2874e7942552409632bf (diff) | |
download | dino-d71604913dd5b3372a823320db83c37c845fac5c.tar.gz dino-d71604913dd5b3372a823320db83c37c845fac5c.zip |
Merge remote-tracking branch 'origin/feature/calls'
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r-- | main/src/ui/application.vala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 358097e3..780c37fd 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -199,6 +199,24 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { dialog.present(); }); add_action(open_shortcuts_action); + + 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); + + var call_window = new CallWindow(); + call_window.controller = new CallWindowController(call_window, call, stream_interactor); + call_window.present(); + }); + add_action(accept_call_action); + + SimpleAction deny_call_action = new SimpleAction("deny-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); + }); + add_action(deny_call_action); } public bool use_csd() { |