diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-10-02 13:16:12 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-02 22:27:19 +0200 |
commit | 42eae7e48bd4d4887d58d794548540f215bbc9b1 (patch) | |
tree | 68fc621af054e627cee4cdc72882ca2a653715bd /mobile-widgets | |
parent | 26de89364cafd252c207b4adb4346c56626d2798 (diff) | |
download | subsurface-42eae7e48bd4d4887d58d794548540f215bbc9b1.tar.gz |
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>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 9edf1692e..65dce34bd 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -334,12 +334,8 @@ 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 || - prefs.credentialStatus === CloudStatus.CS_NOCLOUD) { + if (prefs.credentialStatus === CloudStatus.CS_VERIFIED || + prefs.credentialStatus === CloudStatus.CS_NOCLOUD) { page.actions.main = page.downloadFromDCAction page.actions.right = page.addDiveAction page.title = qsTr("Dive list") @@ -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: { |