aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-22 05:19:34 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-22 11:59:16 -0700
commit27fccbbe4ea21ef4723ded4e01d5ea0df67fb61f (patch)
tree9d479f9ec595c3617fb9b59aaf420aedf87762cf /mobile-widgets/qml
parent6b43b3015dcfff3c0c535e9fee69e2011feeda17 (diff)
downloadsubsurface-27fccbbe4ea21ef4723ded4e01d5ea0df67fb61f.tar.gz
QML UI: when chosing 'no cloud', switch to dive list
Currently we don't remember that we picked 'no cloud' across restarts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DiveList.qml7
1 files changed, 5 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index b9a75abb4..98a7a260f 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -211,7 +211,7 @@ Kirigami.ScrollablePage {
ScrollView {
id: startPageWrapper
anchors.fill: parent
- opacity: (diveListView.count > 0 && (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL)) ? 0 : 1
+ opacity: credentialStatus === QMLManager.NOCLOUD || (diveListView.count > 0 && (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL)) ? 0 : 1
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
onVisibleChanged: {
@@ -219,10 +219,12 @@ Kirigami.ScrollablePage {
page.actions.main = page.saveAction
page.actions.right = page.offlineAction
title = "Cloud credentials"
- } else if(manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL) {
+ } else if(manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD) {
page.actions.main = page.addDiveAction
page.actions.right = null
title = "Dive list"
+ if (diveListView.count === 0)
+ showPassiveNotification(qsTr("Please tap the '+' button to add a dive"), 3000)
} else {
page.actions.main = null
page.actions.right = null
@@ -283,6 +285,7 @@ Kirigami.ScrollablePage {
iconName: "qrc:/qml/nocloud.svg"
onTriggered: {
manager.syncToCloud = false
+ manager.credentialStatus = QMLManager.NOCLOUD
}
}