mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 13:25:52 +03:00
Merge pull request #3948 from nextcloud/bugfix/pn-connection-check
Don't do a connection checks when using push notifications
This commit is contained in:
commit
7dd09b8d8a
1 changed files with 5 additions and 3 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "sharedialog.h"
|
||||
#include "accountmanager.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
#include "pushnotifications.h"
|
||||
|
||||
#if defined(BUILD_UPDATER)
|
||||
#include "updater/ocupdater.h"
|
||||
|
@ -459,9 +460,10 @@ void Application::slotCheckConnection()
|
|||
|
||||
// Don't check if we're manually signed out or
|
||||
// when the error is permanent.
|
||||
if (state != AccountState::SignedOut
|
||||
&& state != AccountState::ConfigurationError
|
||||
&& state != AccountState::AskingCredentials) {
|
||||
const auto pushNotifications = accountState->account()->pushNotifications();
|
||||
const auto pushNotificationsAvailable = (pushNotifications && pushNotifications->isReady());
|
||||
if (state != AccountState::SignedOut && state != AccountState::ConfigurationError
|
||||
&& state != AccountState::AskingCredentials && !pushNotificationsAvailable) {
|
||||
accountState->checkConnectivity();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue