From 795d19ee01c6effcdfe3b5d2d637351ab3c9c2f8 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 14 Feb 2020 14:37:31 +0100 Subject: [PATCH] Fix request history --- lib/views/chat.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index d0a7635..83b81e7 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -81,9 +81,11 @@ class _ChatState extends State<_Chat> { final int _loadHistoryCount = 100; void requestHistory() async { - setState(() => this._loadingHistory = true); - await timeline.requestHistory(historyCount: _loadHistoryCount); - setState(() => this._loadingHistory = false); + if (timeline.events.last.type != EventTypes.RoomCreate) { + setState(() => this._loadingHistory = true); + await timeline.requestHistory(historyCount: _loadHistoryCount); + setState(() => this._loadingHistory = false); + } } @override