diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-04 14:15:29 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-04 16:10:50 -0700 |
commit | 6aaa9a40b6ca57b018f1c9172049dbe34b8632f8 (patch) | |
tree | fb2e430a6bc466fb1efe31b4215ac06446e9a82b /mobile-widgets | |
parent | 7757ce878b3b9351bbc0fcf2f98e211b62203d4a (diff) | |
download | subsurface-6aaa9a40b6ca57b018f1c9172049dbe34b8632f8.tar.gz |
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>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index ce998062d..11e71c5a2 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -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) |