mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Mobile: simpify startup logic
When starting the mobile app, I noticed a short display of an empty page with title "Cloud creditials" just before showing the divelist. Simply a not nice visual effect. This commit simplifies some logic and resolves this. As the code in this part is fragile, this is tested for normal and clean startup of the app, switching credentials, from no cloud to valid account (which even nicely imports the no cloud dives: this surprised me as I have never seen this working). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
26de89364c
commit
42eae7e48b
1 changed files with 3 additions and 7 deletions
|
@ -334,11 +334,7 @@ Kirigami.ScrollablePage {
|
|||
visible: opacity > 0
|
||||
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
|
||||
function setupActions() {
|
||||
if (visible) {
|
||||
page.actions.main = null
|
||||
page.actions.right = null
|
||||
page.title = qsTr("Cloud credentials")
|
||||
} else if (prefs.credentialStatus === CloudStatus.CS_VERIFIED ||
|
||||
if (prefs.credentialStatus === CloudStatus.CS_VERIFIED ||
|
||||
prefs.credentialStatus === CloudStatus.CS_NOCLOUD) {
|
||||
page.actions.main = page.downloadFromDCAction
|
||||
page.actions.right = page.addDiveAction
|
||||
|
@ -348,7 +344,7 @@ Kirigami.ScrollablePage {
|
|||
} else {
|
||||
page.actions.main = null
|
||||
page.actions.right = null
|
||||
page.title = qsTr("Dive list")
|
||||
page.title = qsTr("Cloud credentials")
|
||||
}
|
||||
}
|
||||
onVisibleChanged: {
|
||||
|
|
Loading…
Add table
Reference in a new issue