diff --git a/src/gui/tray/UserModel.cpp b/src/gui/tray/UserModel.cpp index 7fee90aa7..9a6c9e312 100644 --- a/src/gui/tray/UserModel.cpp +++ b/src/gui/tray/UserModel.cpp @@ -98,6 +98,13 @@ void User::setNotificationRefreshInterval(std::chrono::milliseconds interval) _notificationCheckTimer.start(interval.count()); } +void User::slotRefreshImmediately() { + if (_account.data() && _account.data()->isConnected()) { + this->slotRefreshActivities(); + } + this->slotRefreshNotifications(); +} + void User::slotRefresh() { // QElapsedTimer isn't actually constructed as invalid. diff --git a/src/gui/tray/UserModel.h b/src/gui/tray/UserModel.h index db5807043..01ebb4ffd 100644 --- a/src/gui/tray/UserModel.h +++ b/src/gui/tray/UserModel.h @@ -55,6 +55,7 @@ public slots: void slotRefreshNotifications(); void slotRefreshActivities(); void slotRefresh(); + void slotRefreshImmediately(); void setNotificationRefreshInterval(std::chrono::milliseconds interval); void slotRebuildNavigationAppList();