Give up finding last event to respond to after 1k

This commit is contained in:
miruka 2020-05-22 00:18:44 -04:00
parent 6c7335e5db
commit 1fea162fac
2 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
# TODO
- `i <= 1000` resp
- highlight messages being responded to
- highlight messages with mention
- add room members loading indicator

View File

@ -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) {