summary refs log tree commit diff
path: root/src/popups
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-10-28 14:50:00 +0100
committerGitHub <noreply@github.com>2020-10-28 14:50:00 +0100
commitfd4f173966e1d7d4d6c40d07da2f2efa270afc82 (patch)
tree2770e82ae26157d69c5158e76de39129ddc57864 /src/popups
parentTranslated using Weblate (Russian) (diff)
parentDon't pass around empty timeline (diff)
downloadnheko-fd4f173966e1d7d4d6c40d07da2f2efa270afc82.tar.xz
Merge pull request #308 from Nheko-Reborn/build-opt
Optimize build
Diffstat (limited to 'src/popups')
-rw-r--r--src/popups/SuggestionsPopup.cpp6
-rw-r--r--src/popups/SuggestionsPopup.h3
-rw-r--r--src/popups/UserMentions.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/popups/SuggestionsPopup.cpp b/src/popups/SuggestionsPopup.cpp

index 8f355b38..e84435b7 100644 --- a/src/popups/SuggestionsPopup.cpp +++ b/src/popups/SuggestionsPopup.cpp
@@ -19,6 +19,12 @@ SuggestionsPopup::SuggestionsPopup(QWidget *parent) layout_->setSpacing(0); } +QString +SuggestionsPopup::displayName(QString room, QString user) +{ + return cache::displayName(room, user); +} + void SuggestionsPopup::addRooms(const std::vector<RoomSearchResult> &rooms) { diff --git a/src/popups/SuggestionsPopup.h b/src/popups/SuggestionsPopup.h
index 73bfe6f7..c66f2903 100644 --- a/src/popups/SuggestionsPopup.h +++ b/src/popups/SuggestionsPopup.h
@@ -22,7 +22,7 @@ public: const auto &widget = qobject_cast<Item *>(item->widget()); emit itemSelected( - cache::displayName(ChatPage::instance()->currentRoom(), widget->selectedText())); + displayName(ChatPage::instance()->currentRoom(), widget->selectedText())); resetSelection(); } @@ -47,6 +47,7 @@ signals: void itemSelected(const QString &user); private: + QString displayName(QString roomid, QString userid); void hoverSelection(); void resetSelection() { selectedItem_ = -1; } void selectFirstItem() { selectedItem_ = 0; } diff --git a/src/popups/UserMentions.h b/src/popups/UserMentions.h
index b7c4e51d..885fe67d 100644 --- a/src/popups/UserMentions.h +++ b/src/popups/UserMentions.h
@@ -1,6 +1,6 @@ #pragma once -#include <mtx/responses.hpp> +#include <mtx/responses/notifications.hpp> #include <QMap> #include <QString>