Don't pass around empty timeline
This commit is contained in:
parent
2bac6d6c75
commit
70f35de449
6 changed files with 15 additions and 19 deletions
|
|
@ -451,13 +451,10 @@ TimelineViewManager::receivedSessionKey(const std::string &room_id, const std::s
|
|||
}
|
||||
|
||||
void
|
||||
TimelineViewManager::initWithMessages(const std::map<QString, mtx::responses::Timeline> &msgs)
|
||||
TimelineViewManager::initWithMessages(const std::vector<QString> &roomIds)
|
||||
{
|
||||
for (const auto &e : msgs) {
|
||||
addRoom(e.first);
|
||||
|
||||
models.value(e.first)->addEvents(e.second);
|
||||
}
|
||||
for (const auto &roomId : roomIds)
|
||||
addRoom(roomId);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue