1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 12:58:51 +00:00

Fix issue

This commit is contained in:
Pierre HUBERT 2019-05-01 17:10:23 +02:00
parent 9d20c407fc
commit 3109f7c482
2 changed files with 11 additions and 0 deletions

View File

@ -44,9 +44,12 @@ class _ConversationRouteState extends State<ConversationRoute> {
if (_conversation == null) return setError(true);
final conversationName =
await ConversationsHelper.getConversationNameAsync(_conversation);
if(!this.mounted) return null;
if (conversationName == null) return setError(true);
setState(() {

View File

@ -33,6 +33,12 @@ class _ConversationScreenState extends State<ConversationsListScreen> {
_loadConversations();
}
@override
void setState(fn) {
if(mounted)
super.setState(fn);
}
void setError(LoadErrorLevel err) => setState(() => _error = err);
void setLoading(bool loading) => setState(() => _loading = loading);
@ -64,8 +70,10 @@ class _ConversationScreenState extends State<ConversationsListScreen> {
//Get information about the members of the conversations
list.users = await _usersHelper.getUsersInfo(list.allUsersID);
if (list.users == null) return _gotLoadingError();
//Save list
setState(() {
_list = list;