From 4f935595d94c7207fa1892cc44a92e48f081b13a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 13 Mar 2016 11:41:09 -0700 Subject: 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 --- qt-mobile/qml/main.qml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-mobile/qml/main.qml') 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() } -- cgit v1.2.3-70-g09d2