mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Handle call closed event
This commit is contained in:
		@@ -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();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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}");
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user