From 46f10362fcfcab5a1f74baf19229a0229ba7f4db Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Tue, 26 Sep 2017 17:26:54 +0200 Subject: 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 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 --- mobile-widgets/qmlmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2