diff --git a/src/neochatuser.cpp b/src/neochatuser.cpp index 690b5eb01..9c403566f 100644 --- a/src/neochatuser.cpp +++ b/src/neochatuser.cpp @@ -10,13 +10,15 @@ #include "csapi/profile.h" +#include "controller.h" + static Kirigami::PlatformTheme * s_theme = nullptr; NeoChatUser::NeoChatUser(QString userId, Connection *connection) : User(std::move(userId), connection) { if (!s_theme) { - s_theme = static_cast(qmlAttachedPropertiesObject(this, true)); + s_theme = static_cast(qmlAttachedPropertiesObject(&Controller::instance(), true)); Q_ASSERT(s_theme); }