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(() {});
|
setState(() {});
|
||||||
|
|
||||||
// Register to events
|
// Register to events
|
||||||
this.listenChangeState<UserJoinedCallEvent>((e) {
|
this.listen<UserJoinedCallEvent>((e) async {
|
||||||
// TODO : get user information if required
|
if (e.callID != convID) return;
|
||||||
if (e.callID == convID) _membersList.add(CallMember(userID: e.userID));
|
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) {
|
this.listen<UserLeftCallEvent>((e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user