Fix own messages not showing as encrypted

master
Nicolas Werner 5 years ago
parent d5e1475a5c
commit b00e624fb0
  1. 14
      src/timeline/TimelineModel.cpp

@ -477,14 +477,14 @@ TimelineModel::addEvents(const mtx::responses::Timeline &timeline)
std::vector<QString> ids = internalAddEvents(timeline.events); std::vector<QString> ids = internalAddEvents(timeline.events);
if (ids.empty()) if (!ids.empty()) {
return; beginInsertRows(QModelIndex(), 0, static_cast<int>(ids.size() - 1));
this->eventOrder.insert(this->eventOrder.begin(), ids.rbegin(), ids.rend());
beginInsertRows(QModelIndex(), 0, static_cast<int>(ids.size() - 1)); endInsertRows();
this->eventOrder.insert(this->eventOrder.begin(), ids.rbegin(), ids.rend()); }
endInsertRows();
updateLastMessage(); if (!timeline.events.empty())
updateLastMessage();
} }
template<typename T> template<typename T>

Loading…
Cancel
Save