diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index fb8451aa4c7b8..fec2202ef87e9 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -115,6 +115,8 @@ void Systray::create() if (_trayEngine) { if (!AccountManager::instance()->accounts().isEmpty()) { _trayEngine->rootContext()->setContextProperty("activityModel", UserModel::instance()->currentActivityModel()); + } else { + _trayEngine->rootContext()->setContextProperty("activityModel", &_fakeActivityModel); } QQmlComponent trayWindowComponent(trayEngine(), QStringLiteral("qrc:/qml/src/gui/tray/Window.qml")); diff --git a/src/gui/systray.h b/src/gui/systray.h index 5a450580841a9..8a65c45e4d424 100644 --- a/src/gui/systray.h +++ b/src/gui/systray.h @@ -15,12 +15,12 @@ #ifndef SYSTRAY_H #define SYSTRAY_H -#include - #include "accountmanager.h" #include "tray/usermodel.h" +#include #include +#include class QScreen; class QQmlApplicationEngine; @@ -188,6 +188,8 @@ private slots: QSet _callsAlreadyNotified; QPointer _editFileLocallyLoadingDialog; QVector _fileDetailDialogs; + + QStringListModel _fakeActivityModel; }; } // namespace OCC diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index bbe0330d4af1d..d9ea16dd871d2 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -966,7 +966,7 @@ ApplicationWindow { } Connections { target: activityModel - onInteractiveActivityReceived: { + function onInteractiveActivityReceived() { if (!activityList.atYBeginning) { newActivitiesButtonLoader.active = true; }