diff --git a/src/RoomsModel.cpp b/src/RoomsModel.cpp index 1c3085ea..28ffb6e1 100644 --- a/src/RoomsModel.cpp +++ b/src/RoomsModel.cpp @@ -15,6 +15,10 @@ RoomsModel::RoomsModel(bool showOnlyRoomWithAliases, QObject *parent) { std::vector rooms_ = cache::joinedRooms(); roomInfos = cache::getRoomInfo(rooms_); + if (!showOnlyRoomWithAliases_) { + roomids.reserve(rooms_.size()); + roomAliases.reserve(rooms_.size()); + } for (const auto &r : rooms_) { auto roomAliasesList = cache::client()->getRoomAliases(r);