1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Handle conversation deleted event

This commit is contained in:
2021-03-13 13:52:18 +01:00
parent f9db9aa632
commit fb80f3bd52
3 changed files with 22 additions and 4 deletions

View File

@ -186,11 +186,17 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
}
});
this.listen<RemovedUserFromConversation>((ev) {
this.listen<RemovedUserFromConversationEvent>((ev) {
if (ev.userID == userID() && ev.convID == widget.conversationID) {
setState(() => _error = ErrorLevel.MAJOR);
}
});
this.listen<DeletedConversationEvent>((ev) {
if (ev.convID == widget.conversationID) {
setState(() => _error = ErrorLevel.MAJOR);
}
});
}
/// Free resources when this conversation widget is no longer required