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>
This commit is contained in:
jan Iversen 2019-12-20 08:16:52 +01:00 committed by Dirk Hohndel
parent 11810d5d06
commit 611c4bb088
3 changed files with 26 additions and 26 deletions

View file

@ -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