mobile/cloud-storage: fix test for no cloud to cloud transition

The noCloud variable contains our desired state, we need to test for the
previous state for this to make sense.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-04-04 14:13:12 -07:00
parent 46032af320
commit 7757ce878b

View file

@ -595,7 +595,7 @@ void QMLManager::saveCloudCredentials(const QString &newEmail, const QString &ne
qPrefCloudStorage::set_cloud_storage_email(newEmail);
qPrefCloudStorage::set_cloud_storage_password(newPassword);
if (noCloud && cloudCredentialsChanged && dive_table.nr) {
if (m_oldStatus == qPrefCloudStorage::CS_NOCLOUD && cloudCredentialsChanged && dive_table.nr) {
// we came from NOCLOUD and are connecting to a cloud account;
// since we already have dives in the table, let's remember that so we can keep them
noCloudToCloud = true;