mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Fix refresh issue when conversation has been closed
This commit is contained in:
parent
32c15ae915
commit
910b8188ae
@ -64,8 +64,7 @@ class _ConversationScreenState extends State<ConversationScreen> {
|
||||
void deactivate() {
|
||||
super.deactivate();
|
||||
|
||||
if(_refreshTime != null)
|
||||
_refreshTime.cancel();
|
||||
if (_refreshTime != null) _refreshTime.cancel();
|
||||
}
|
||||
|
||||
void _setError(ErrorLevel err) => setState(() => _error = err);
|
||||
@ -94,6 +93,8 @@ class _ConversationScreenState extends State<ConversationScreen> {
|
||||
|
||||
/// Load a list of messages
|
||||
Future<void> _loadMessages(bool online) async {
|
||||
if (!mounted) return;
|
||||
|
||||
//First, get the messages
|
||||
final messages = await _conversationsHelper.getNewMessages(
|
||||
conversationID: widget.conversationID,
|
||||
|
Loading…
Reference in New Issue
Block a user