diff options
-rw-r--r-- | src/timeline2/TimelineModel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timeline2/TimelineModel.cpp b/src/timeline2/TimelineModel.cpp index b37ade54..45126b36 100644 --- a/src/timeline2/TimelineModel.cpp +++ b/src/timeline2/TimelineModel.cpp @@ -525,7 +525,7 @@ TimelineModel::addEvents(const mtx::responses::Timeline &timeline) this->eventOrder.insert(this->eventOrder.end(), ids.begin(), ids.end()); endInsertRows(); - for (auto id = ids.rbegin(); id != ids.rend(); id++) { + for (auto id = eventOrder.rbegin(); id != eventOrder.rend(); id++) { auto event = events.value(*id); if (auto e = boost::get<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( &event)) { |