summary refs log tree commit diff
path: root/src/ChatPage.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-04-27 01:57:46 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-04-27 01:57:46 +0300
commitb72e48cbab53743b80130758b4bdb81e5778a014 (patch)
treef281fd56ebad04a258a97e3e51056f77ac6ad700 /src/ChatPage.cc
parentCopy lmdb.dll in the windows installer (diff)
downloadnheko-b72e48cbab53743b80130758b4bdb81e5778a014.tar.xz
Improve room searching
fixes #257
Diffstat (limited to 'src/ChatPage.cc')
-rw-r--r--src/ChatPage.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc

index f64f332d..8981cb98 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc
@@ -699,7 +699,7 @@ ChatPage::showQuickSwitcher() { if (quickSwitcher_.isNull()) { quickSwitcher_ = QSharedPointer<QuickSwitcher>( - new QuickSwitcher(this), + new QuickSwitcher(cache_, this), [](QuickSwitcher *switcher) { switcher->deleteLater(); }); connect(quickSwitcher_.data(), @@ -721,17 +721,7 @@ ChatPage::showQuickSwitcher() quickSwitcherModal_->setColor(QColor(30, 30, 30, 170)); } - try { - std::map<QString, QString> rooms; - auto info = cache_->roomInfo(false); - for (auto it = info.begin(); it != info.end(); ++it) - rooms.emplace(QString::fromStdString(it.value().name).trimmed(), it.key()); - quickSwitcher_->setRoomList(rooms); - quickSwitcherModal_->show(); - } catch (const lmdb::error &e) { - const auto err = QString::fromStdString(e.what()); - emit showNotification(QString("Failed to load room list: %1").arg(err)); - } + quickSwitcherModal_->show(); } void