aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-20 08:16:52 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-24 15:53:15 -0800
commit611c4bb088f856355e5c038e5c533af544b7f02a (patch)
tree190f1a8e8037dcb6a8fa186f16cd98a4ff876277 /mobile-widgets/qml/main.qml
parent11810d5d0677ea1845ac4272c8578010132a8e1e (diff)
downloadsubsurface-611c4bb088f856355e5c038e5c533af544b7f02a.tar.gz
mobile UI/login: move startpage to main
StartPage does not belong in divelist. Remove startPage from diveList and anchor in main. Make needed functional changes. 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.qml27
1 files changed, 25 insertions, 2 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index b20ce4262..b8ef213fb 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -708,8 +708,6 @@ if you have network connectivity and want to sync your data to cloud storage."),
}
}
- pageStack.initialPage: diveList
-
property int hackToOpenMap: 0 /* Otherpage */
/* I really want an enum, but those are painful in QML, so let's use numbers
* 0 (Otherpage) - the last page selected was a non-map page
@@ -774,6 +772,31 @@ if you have network connectivity and want to sync your data to cloud storage."),
id: manager
}
+ StartPage {
+ id: startPage
+ anchors.fill: parent
+ visible: prefs.credentialStatus !== CloudStatus.CS_NOCLOUD &&
+ prefs.credentialStatus !== CloudStatus.CS_VERIFIED
+ Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
+
+ onVisibleChanged: {
+ console.log("---> Startpage changed visibility to " + visible)
+ if (visible) {
+ pageStack.clear()
+ diveList.visible = false
+ } else {
+ pageStack.push(diveList)
+ }
+ }
+
+ Component.onCompleted: {
+ if (!visible) {
+ console.log("---> Startpage change to diveList")
+ pageStack.initPage = diveList
+ }
+ }
+ }
+
DiveList {
id: diveList
visible: false