mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 12:55:44 +03:00
Merge pull request #2615 from nextcloud/fetch_apps_on_connectivity_changes_only
Fetch apps when we get connected only
This commit is contained in:
commit
46aba0832d
1 changed files with 7 additions and 3 deletions
|
@ -54,6 +54,13 @@ AccountState::AccountState(AccountPtr account)
|
|||
connect(account.data(), &Account::credentialsAsked,
|
||||
this, &AccountState::slotCredentialsAsked);
|
||||
_timeSinceLastETagCheck.invalidate();
|
||||
|
||||
connect(this, &AccountState::isConnectedChanged, [=]{
|
||||
// Get the Apps available on the server if we're now connected.
|
||||
if (isConnected()) {
|
||||
fetchNavigationApps();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
AccountState::~AccountState() = default;
|
||||
|
@ -236,9 +243,6 @@ void AccountState::checkConnectivity()
|
|||
// Use a small authed propfind as a minimal ping when we're
|
||||
// already connected.
|
||||
conValidator->checkAuthentication();
|
||||
|
||||
// Get the Apps available on the server.
|
||||
fetchNavigationApps();
|
||||
} else {
|
||||
// Check the server and then the auth.
|
||||
|
||||
|
|
Loading…
Reference in a new issue