1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-09-19 05:48:54 +00:00

Handle call closed event

This commit is contained in:
2020-04-20 14:32:57 +02:00
parent 08d357fc72
commit 456df166b1
3 changed files with 23 additions and 0 deletions

View File

@@ -86,6 +86,13 @@ class UserLeftCallEvent {
UserLeftCallEvent(this.callID, this.userID);
}
/// Call closed event
class CallClosedEvent {
final int callID;
CallClosedEvent(this.callID);
}
class EventsHelper {
static EventBus _mgr = EventBus();

View File

@@ -173,6 +173,11 @@ class WebSocketHelper {
UserLeftCallEvent(msg.data["callID"], msg.data["userID"]));
break;
// The call has been close
case "call_closed":
EventsHelper.emit(CallClosedEvent(msg.data));
break;
default:
throw Exception("Unknown message type: ${msg.title}");
}