1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00

Fix potential issue

This commit is contained in:
Pierre HUBERT 2020-04-20 17:34:31 +02:00
parent 096251eaad
commit e05323c3bb

View File

@ -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) {