summary refs log tree commit diff
path: root/src/TextInputWidget.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-12-15 02:56:04 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2019-12-15 02:56:04 +0100
commit5fc1f3bd678cca690268eafbb7e4595657a6e133 (patch)
treeed88e9c771494672045d16aca6831b3fde40d112 /src/TextInputWidget.cpp
parentAdd qml debugging option (diff)
downloadnheko-5fc1f3bd678cca690268eafbb7e4595657a6e133.tar.xz
Reduce overhead of Cache.h
Diffstat (limited to '')
-rw-r--r--src/TextInputWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp

index 66700dbc..5e63eca5 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp
@@ -529,12 +529,12 @@ TextInputWidget::TextInputWidget(QWidget *parent) emit heightChanged(widgetHeight); }); connect(input_, &FilteredTextEdit::showSuggestions, this, [this](const QString &q) { - if (q.isEmpty() || !cache::client()) + if (q.isEmpty()) return; QtConcurrent::run([this, q = q.toLower().toStdString()]() { try { - emit input_->resultsRetrieved(cache::client()->searchUsers( + emit input_->resultsRetrieved(cache::searchUsers( ChatPage::instance()->currentRoom().toStdString(), q)); } catch (const lmdb::error &e) { std::cout << e.what() << '\n';