From a143b22bf38a5b9f93ec876606a5f9a1fa135de5 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sat, 28 Oct 2023 09:43:25 +0200 Subject: [PATCH] fix: canRequestHistory is true while requestHistory throws an exception when events is empty --- lib/src/timeline.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/src/timeline.dart b/lib/src/timeline.dart index c7cc26b7b..56a210951 100644 --- a/lib/src/timeline.dart +++ b/lib/src/timeline.dart @@ -75,7 +75,6 @@ class Timeline { bool _collectHistoryUpdates = false; bool get canRequestHistory { - if (events.isEmpty) return true; return room.prev_batch != null && events.last.type != EventTypes.RoomCreate; }