diff --git a/src/popups/PopupItem.cpp b/src/popups/PopupItem.cpp
index c4d4327f..db97e4a3 100644
--- a/src/popups/PopupItem.cpp
+++ b/src/popups/PopupItem.cpp
@@ -49,7 +49,7 @@ UserItem::UserItem(QWidget *parent, const QString &user_id)
: PopupItem(parent)
, userId_{user_id}
{
- auto displayName = Cache::displayName(ChatPage::instance()->currentRoom(), userId_);
+ auto displayName = cache::displayName(ChatPage::instance()->currentRoom(), userId_);
avatar_->setLetter(utils::firstChar(displayName));
@@ -70,7 +70,7 @@ UserItem::updateItem(const QString &user_id)
{
userId_ = user_id;
- auto displayName = Cache::displayName(ChatPage::instance()->currentRoom(), userId_);
+ auto displayName = cache::displayName(ChatPage::instance()->currentRoom(), userId_);
// If it's a matrix id we use the second letter.
if (displayName.size() > 1 && displayName.at(0) == '@')
@@ -93,7 +93,7 @@ UserItem::mousePressEvent(QMouseEvent *event)
{
if (event->buttons() != Qt::RightButton)
emit clicked(
- Cache::displayName(ChatPage::instance()->currentRoom(), selectedText()));
+ cache::displayName(ChatPage::instance()->currentRoom(), selectedText()));
QWidget::mousePressEvent(event);
}
diff --git a/src/popups/PopupItem.h b/src/popups/PopupItem.h
index cab73a9d..7a710fdb 100644
--- a/src/popups/PopupItem.h
+++ b/src/popups/PopupItem.h
@@ -6,7 +6,6 @@
#include <QWidget>
#include "../AvatarProvider.h"
-#include "../Cache.h"
#include "../ChatPage.h"
class Avatar;
@@ -81,4 +80,4 @@ private:
QLabel *roomName_;
QString roomId_;
RoomSearchResult info_;
-};
\ No newline at end of file
+};
diff --git a/src/popups/ReplyPopup.cpp b/src/popups/ReplyPopup.cpp
index 0ebf7c88..42a5a6d3 100644
--- a/src/popups/ReplyPopup.cpp
+++ b/src/popups/ReplyPopup.cpp
@@ -8,6 +8,7 @@
#include "../ui/Avatar.h"
#include "../ui/DropShadow.h"
#include "../ui/TextLabel.h"
+#include "PopupItem.h"
#include "ReplyPopup.h"
ReplyPopup::ReplyPopup(QWidget *parent)
diff --git a/src/popups/ReplyPopup.h b/src/popups/ReplyPopup.h
index b28cd0cf..1fa3bb83 100644
--- a/src/popups/ReplyPopup.h
+++ b/src/popups/ReplyPopup.h
@@ -2,17 +2,14 @@
#include <QHBoxLayout>
#include <QLabel>
-#include <QPoint>
#include <QVBoxLayout>
#include <QWidget>
-#include "../AvatarProvider.h"
-#include "../Cache.h"
-#include "../ChatPage.h"
-#include "../Utils.h"
#include "../ui/FlatButton.h"
#include "../ui/TextLabel.h"
-#include "PopupItem.h"
+
+struct RelatedInfo;
+class UserItem;
class ReplyPopup : public QWidget
{
diff --git a/src/popups/SuggestionsPopup.h b/src/popups/SuggestionsPopup.h
index 536c82fb..de52760a 100644
--- a/src/popups/SuggestionsPopup.h
+++ b/src/popups/SuggestionsPopup.h
@@ -5,9 +5,8 @@
#include <QPoint>
#include <QWidget>
-#include "../AvatarProvider.h"
-#include "../Cache.h"
-#include "../ChatPage.h"
+#include "CacheStructs.h"
+#include "ChatPage.h"
#include "PopupItem.h"
Q_DECLARE_METATYPE(QVector<SearchResult>)
@@ -28,7 +27,7 @@ public:
const auto &widget = qobject_cast<Item *>(item->widget());
emit itemSelected(
- Cache::displayName(ChatPage::instance()->currentRoom(), widget->selectedText()));
+ cache::displayName(ChatPage::instance()->currentRoom(), widget->selectedText()));
resetSelection();
}
diff --git a/src/popups/UserMentions.cpp b/src/popups/UserMentions.cpp
index 3be5c462..763eeffc 100644
--- a/src/popups/UserMentions.cpp
+++ b/src/popups/UserMentions.cpp
@@ -103,7 +103,7 @@ UserMentions::showPopup()
delete widget;
}
- auto notifs = cache::client()->getTimelineMentions();
+ auto notifs = cache::getTimelineMentions();
initializeMentions(notifs);
show();
|