mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Reserve memory for rooms in completer
This commit is contained in:
parent
0e60c09b19
commit
b31e74d9f6
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,10 @@ RoomsModel::RoomsModel(bool showOnlyRoomWithAliases, QObject *parent)
|
||||||
{
|
{
|
||||||
std::vector<std::string> rooms_ = cache::joinedRooms();
|
std::vector<std::string> rooms_ = cache::joinedRooms();
|
||||||
roomInfos = cache::getRoomInfo(rooms_);
|
roomInfos = cache::getRoomInfo(rooms_);
|
||||||
|
if (!showOnlyRoomWithAliases_) {
|
||||||
|
roomids.reserve(rooms_.size());
|
||||||
|
roomAliases.reserve(rooms_.size());
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto &r : rooms_) {
|
for (const auto &r : rooms_) {
|
||||||
auto roomAliasesList = cache::client()->getRoomAliases(r);
|
auto roomAliasesList = cache::client()->getRoomAliases(r);
|
||||||
|
|
Loading…
Reference in a new issue