mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
Fix potential issue
This commit is contained in:
parent
096251eaad
commit
e05323c3bb
@ -84,9 +84,15 @@ class _CallScreenState extends SafeState<CallScreen> {
|
||||
setState(() {});
|
||||
|
||||
// Register to events
|
||||
this.listenChangeState<UserJoinedCallEvent>((e) {
|
||||
// TODO : get user information if required
|
||||
if (e.callID == convID) _membersList.add(CallMember(userID: e.userID));
|
||||
this.listen<UserJoinedCallEvent>((e) async {
|
||||
if (e.callID != convID) return;
|
||||
try {
|
||||
if (!_usersList.hasUser(e.userID))
|
||||
_usersList.add(await UsersHelper().getSingleWithThrow(e.userID));
|
||||
setState(() => _membersList.add(CallMember(userID: e.userID)));
|
||||
} catch (e, stack) {
|
||||
print("$e\n$stack");
|
||||
}
|
||||
});
|
||||
|
||||
this.listen<UserLeftCallEvent>((e) {
|
||||
|
Loading…
Reference in New Issue
Block a user