diff options
author | Markus Goetz <markus@woboq.com> | 2018-02-08 19:20:50 +0300 |
---|---|---|
committer | Markus Goetz <markus@woboq.com> | 2018-02-12 11:01:00 +0300 |
commit | 9fc175231db97e2cf885d04eaa0e61e749f57c0c (patch) | |
tree | 43ba79e82f3236c1a3f268ceceabb10aa31da159 /src/gui/settingsdialog.cpp | |
parent | 4dd0a75cced7e9c279d99d1eeb4ef1ccefa6aad7 (diff) |
Notifications: Immediately request when getting account online
Diffstat (limited to 'src/gui/settingsdialog.cpp')
-rw-r--r-- | src/gui/settingsdialog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index d4b9c3eda..0a8961405 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -254,6 +254,9 @@ void SettingsDialog::accountAdded(AccountState *s) connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialog::slotAccountAvatarChanged); connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialog::slotAccountDisplayNameChanged); + // Refresh immediatly when getting online + connect(s, &AccountState::isConnectedChanged, this, &SettingsDialog::slotRefreshActivityAccountStateSender); + slotRefreshActivity(s); } @@ -396,6 +399,11 @@ QAction *SettingsDialog::createColorAwareAction(const QString &iconPath, const Q return createActionWithIcon(coloredIcon, text, iconPath); } +void SettingsDialog::slotRefreshActivityAccountStateSender() +{ + slotRefreshActivity(qobject_cast<AccountState*>(sender())); +} + void SettingsDialog::slotRefreshActivity(AccountState *accountState) { if (accountState) { |