summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-09-26 17:26:54 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-29 08:13:25 -0700
commit46f10362fcfcab5a1f74baf19229a0229ba7f4db (patch)
treed94cfba8d1a4440eae5c42e12abaf49201010d3b /mobile-widgets/qmlmanager.cpp
parent2e91de9d950aa77b9bd181d422a0d5c3ed014079 (diff)
downloadsubsurface-46f10362fcfcab5a1f74baf19229a0229ba7f4db.tar.gz
mobile: do not go to NO_CLOUD status from UNKNOWN
In case the credential status is UNKNOWN, and the cloud username and password are empty, do not go automatically to NO_CLOUD status. This is (again) preparation for future work on credential management. For example, the user entered an email address with a spelling error, so does not receive a PIN code email. This user needs a way out, so there needs to be a <cancel> button on the PIN code screen. And the most logic was of cancelling is emptying the entered username/passwd and let the user try again. Without this change, the user immediately gets into the (somewhat) final NO_CLOUD state, which will result in (very) confused users. With this change, there is exacly one way (left) to get into a NO_CLOUD setup: hitting the proper button, so a deliberate user action. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 94e58900b..ada4f57c7 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -231,7 +231,7 @@ void QMLManager::finishSetup()
// but we need to make sure we stay the only ones accessing git storage
alreadySaving = true;
openLocalThenRemote(url);
- } else if (!same_string(existing_filename, "")) {
+ } else if (!same_string(existing_filename, "") && credentialStatus() != CS_UNKNOWN) {
setCredentialStatus(CS_NOCLOUD);
appendTextToLog(tr("working in no-cloud mode"));
int error = parse_file(existing_filename);