|
|
@ -477,13 +477,13 @@ 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)); |
|
|
|
beginInsertRows(QModelIndex(), 0, static_cast<int>(ids.size() - 1)); |
|
|
|
this->eventOrder.insert(this->eventOrder.begin(), ids.rbegin(), ids.rend()); |
|
|
|
this->eventOrder.insert(this->eventOrder.begin(), ids.rbegin(), ids.rend()); |
|
|
|
endInsertRows(); |
|
|
|
endInsertRows(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!timeline.events.empty()) |
|
|
|
updateLastMessage(); |
|
|
|
updateLastMessage(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|