mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/cloud-storage: correctly transition from no-cloud to cloud
We know that we have valid credentials, so calling openLocalThenRemote() makes no sense, worse, it doesn't respect the special case of transitioning between accounts. That's the whole point of having a separate loadDivesWithValidCredentials() call. Once we have transitioned state, we need to record the now current state as the old state so that future transitions will work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7757ce878b
commit
6aaa9a40b6
1 changed files with 2 additions and 3 deletions
|
@ -608,8 +608,6 @@ void QMLManager::saveCloudCredentials(const QString &newEmail, const QString &ne
|
|||
// let's make sure there are no unsaved changes
|
||||
saveChangesLocal();
|
||||
syncLoadFromCloud();
|
||||
QString url;
|
||||
getCloudURL(url);
|
||||
manager()->clearAccessCache(); // remove any chached credentials
|
||||
clear_git_id(); // invalidate our remembered GIT SHA
|
||||
MobileModels::instance()->clear();
|
||||
|
@ -619,8 +617,9 @@ void QMLManager::saveCloudCredentials(const QString &newEmail, const QString &ne
|
|||
// of whether we're in offline mode or not, to make sure the repository is synced
|
||||
currentGitLocalOnly = git_local_only;
|
||||
git_local_only = false;
|
||||
openLocalThenRemote(url);
|
||||
loadDivesWithValidCredentials();
|
||||
}
|
||||
setOldStatus((qPrefCloudStorage::cloud_status)qPrefCloudStorage::cloud_verification_status());
|
||||
}
|
||||
|
||||
bool QMLManager::verifyCredentials(QString email, QString password, QString pin)
|
||||
|
|
Loading…
Add table
Reference in a new issue