aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-20 16:17:52 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-24 10:17:45 -0800
commit4b713ece96a435f92589afcf89e3d93c37dfcbd8 (patch)
treea3e2a7517cdbb69d1532c861990df57be9e1f0e5 /mobile-widgets/qml/main.qml
parent9117aa2a52bec1997cb69984e6a9f333432e5167 (diff)
downloadsubsurface-4b713ece96a435f92589afcf89e3d93c37dfcbd8.tar.gz
mobile UI/login: do not revert to old credentials.
If the user asked to change credentials it is equivalent to a signout, so no need to store old credentials. This simplification allows removal of the temporary credentials in qmlPrefs. this commits secures the user is locked in the login page, until one of 3 things happen: - enter verified credentials (divelist is loaded from cloud) - select no-cloud mode (divelist is loaded from local) - enter new credentials, PIN page shows, enter PIN or cancel (back to enter credentials). This is consistent even if the program is restarted. Old version had a non consistent way: A user enters new credentials, sees the PIN screen, but does not receive the email immediately, so works with other applications (causing the mobile app to close) Having received the email with the PiN, the user starts mobile again, BUT does not see the PIN screen, instead the old credentials are used. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/main.qml')
-rw-r--r--mobile-widgets/qml/main.qml7
1 files changed, 0 insertions, 7 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index b54a52b5e..3737f3357 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -244,13 +244,6 @@ Kirigami.ApplicationWindow {
text: qsTr("Dive list")
onTriggered: {
manager.appendTextToLog("requested dive list with credential status " + prefs.credentialStatus)
- if (prefs.credentialStatus == CloudStatus.CS_UNKNOWN) {
- // the user has asked to change credentials - if the credentials before that
- // were valid, go back to dive list
- if (prefs.oldStatus == CloudStatus.CS_VERIFIED) {
- prefs.credentialStatus = prefs.oldStatus
- }
- }
returnTopPage()
globalDrawer.close()
}