From 1fea162fac588cfda83d81acdac780ad4ad1f354 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 22 May 2020 00:18:44 -0400 Subject: [PATCH] Give up finding last event to respond to after 1k --- TODO.md | 1 - src/gui/Pages/Chat/Timeline/EventList.qml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 695a26ca..9506c8da 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TODO -- `i <= 1000` resp - highlight messages being responded to - highlight messages with mention - add room members loading indicator diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index 214e1be5..26fdbae6 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -107,7 +107,7 @@ Rectangle { event = eventList.getSortedChecked.slice(-1)[0] } else { // Find most recent event that wasn't sent by us - for (let i = 0; i < eventList.model.count; i++) { + for (let i = 0; i < eventList.model.count && i <= 1000; i++) { const potentialEvent = eventList.model.get(i) if (potentialEvent.sender_id !== chat.userId) {