mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 04:08:54 +03:00
Notifications: Immediately request when getting account online
This commit is contained in:
parent
00d8343e76
commit
13b2e51dfe
4 changed files with 19 additions and 0 deletions
|
@ -237,6 +237,9 @@ void SettingsDialog::accountAdded(AccountState *s)
|
||||||
connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialog::slotAccountAvatarChanged);
|
connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialog::slotAccountAvatarChanged);
|
||||||
connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialog::slotAccountDisplayNameChanged);
|
connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialog::slotAccountDisplayNameChanged);
|
||||||
|
|
||||||
|
// Refresh immediatly when getting online
|
||||||
|
connect(s, &AccountState::isConnectedChanged, this, &SettingsDialog::slotRefreshActivityAccountStateSender);
|
||||||
|
|
||||||
slotRefreshActivity(s);
|
slotRefreshActivity(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,6 +382,11 @@ QAction *SettingsDialog::createColorAwareAction(const QString &iconPath, const Q
|
||||||
return createActionWithIcon(coloredIcon, text, iconPath);
|
return createActionWithIcon(coloredIcon, text, iconPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsDialog::slotRefreshActivityAccountStateSender()
|
||||||
|
{
|
||||||
|
slotRefreshActivity(qobject_cast<AccountState*>(sender()));
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsDialog::slotRefreshActivity(AccountState *accountState)
|
void SettingsDialog::slotRefreshActivity(AccountState *accountState)
|
||||||
{
|
{
|
||||||
if (accountState) {
|
if (accountState) {
|
||||||
|
|
|
@ -59,6 +59,7 @@ public slots:
|
||||||
void showIssuesList(const QString &folderAlias);
|
void showIssuesList(const QString &folderAlias);
|
||||||
void slotSwitchPage(QAction *action);
|
void slotSwitchPage(QAction *action);
|
||||||
void slotRefreshActivity(AccountState *accountState);
|
void slotRefreshActivity(AccountState *accountState);
|
||||||
|
void slotRefreshActivityAccountStateSender();
|
||||||
void slotAccountAvatarChanged();
|
void slotAccountAvatarChanged();
|
||||||
void slotAccountDisplayNameChanged();
|
void slotAccountDisplayNameChanged();
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "generalsettings.h"
|
#include "generalsettings.h"
|
||||||
#include "networksettings.h"
|
#include "networksettings.h"
|
||||||
#include "accountsettings.h"
|
#include "accountsettings.h"
|
||||||
|
#include "accountstate.h"
|
||||||
#include "creds/abstractcredentials.h"
|
#include "creds/abstractcredentials.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
#include "progressdispatcher.h"
|
#include "progressdispatcher.h"
|
||||||
|
@ -161,6 +162,9 @@ void SettingsDialogMac::accountAdded(AccountState *s)
|
||||||
connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialogMac::slotAccountAvatarChanged);
|
connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialogMac::slotAccountAvatarChanged);
|
||||||
connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialogMac::slotAccountDisplayNameChanged);
|
connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialogMac::slotAccountDisplayNameChanged);
|
||||||
|
|
||||||
|
// Refresh immediatly when getting online
|
||||||
|
connect(s, &AccountState::isConnectedChanged, this, &SettingsDialogMac::slotRefreshActivityAccountStateSender);
|
||||||
|
|
||||||
slotRefreshActivity(s);
|
slotRefreshActivity(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,6 +180,11 @@ void SettingsDialogMac::accountRemoved(AccountState *s)
|
||||||
_activitySettings->slotRemoveAccount(s);
|
_activitySettings->slotRemoveAccount(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsDialogMac::slotRefreshActivityAccountStateSender()
|
||||||
|
{
|
||||||
|
slotRefreshActivity(qobject_cast<AccountState*>(sender()));
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsDialogMac::slotRefreshActivity(AccountState *accountState)
|
void SettingsDialogMac::slotRefreshActivity(AccountState *accountState)
|
||||||
{
|
{
|
||||||
if (accountState) {
|
if (accountState) {
|
||||||
|
|
|
@ -49,6 +49,7 @@ public slots:
|
||||||
void showActivityPage();
|
void showActivityPage();
|
||||||
void showIssuesList(const QString &folderAlias);
|
void showIssuesList(const QString &folderAlias);
|
||||||
void slotRefreshActivity(AccountState *accountState);
|
void slotRefreshActivity(AccountState *accountState);
|
||||||
|
void slotRefreshActivityAccountStateSender();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void accountAdded(AccountState *);
|
void accountAdded(AccountState *);
|
||||||
|
|
Loading…
Reference in a new issue