diff options
author | Camila <hello@camila.codes> | 2020-10-03 18:12:16 +0300 |
---|---|---|
committer | Camila <hello@camila.codes> | 2021-03-24 17:39:13 +0300 |
commit | f4d8699db85a0e8768a676a6ec556dd31ce22234 (patch) | |
tree | df057eeb643342d6daf51d410ad1104ff58ee52e /src/gui/accountstate.h | |
parent | c29c011095d92f21684a01cfcb0a24e37c536f38 (diff) |
Add UserStatus class to retrieve the user status.
- AccountState controls UserStatus.
- Display user status in the system tray menu next to user's avatar.
Signed-off-by: Camila <hello@camila.codes>
Diffstat (limited to 'src/gui/accountstate.h')
-rw-r--r-- | src/gui/accountstate.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h index 4c6bba62d..d31ebc7d8 100644 --- a/src/gui/accountstate.h +++ b/src/gui/accountstate.h @@ -31,6 +31,7 @@ class AccountState; class Account; class AccountApp; class RemoteWipe; +class UserStatus; using AccountStatePtr = QExplicitlySharedDataPointer<AccountState>; using AccountAppList = QList<AccountApp *>; @@ -161,6 +162,10 @@ public: ///Asks for user credentials void handleInvalidCredentials(); + QString currentUserStatus() const; + + void fetchCurrentUserStatus(); + public slots: /// Triggers a ping to the server to update state and /// connection status and errors. @@ -174,6 +179,7 @@ signals: void stateChanged(State state); void isConnectedChanged(); void hasFetchedNavigationApps(); + void userStatusChanged(); protected Q_SLOTS: void slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList &errors); @@ -223,6 +229,7 @@ private: */ AccountAppList _apps; + UserStatus *_userStatus; }; class AccountApp : public QObject |