diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-13 11:41:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-13 11:41:09 -0700 |
commit | 4f935595d94c7207fa1892cc44a92e48f081b13a (patch) | |
tree | 72c4fadef5355176e568c6900b682f1d0414c27c | |
parent | 8dcb6fa25cc9a1e9227181d2e6e3908f0d99cc75 (diff) | |
download | subsurface-4f935595d94c7207fa1892cc44a92e48f081b13a.tar.gz |
QML UI: make return to dive list work when entering credentials
If the user tapped on the "Cloud credentials" menu and wants to go back to the
dive list (by selecting that option from the menu), allow them to do so if they
previously had valid credentials.
This allows them to go back to the dive list even on a device without a back
button like an iOS device.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-mobile/qml/main.qml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 259cb5d99..71d507ce7 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -46,6 +46,13 @@ MobileComponents.ApplicationWindow { Action { text: "Dive list" onTriggered: { + if (manager.credentialStatus == QMLManager.UNKNOWN) { + // the user has asked to change credentials - if the credentials before that + // were valid, go back to dive list + if (oldStatus == QMLManager.VALID || oldStatus == QMLManager.VALID_EMAIL) { + manager.credentialStatus = oldStatus + } + } returnTopPage() globalDrawer.close() } |