diff options
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 31b2204fa..36929951a 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -13,7 +13,7 @@ Kirigami.ScrollablePage { title: qsTr("Dive list") verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff width: subsurfaceTheme.columnWidth - property int credentialStatus: manager.credentialStatus + property int credentialStatus: prefs.credentialStatus property int numDives: diveListView.count property color textColor: subsurfaceTheme.textColor property color secondaryTextColor: subsurfaceTheme.secondaryTextColor @@ -23,14 +23,14 @@ Kirigami.ScrollablePage { supportsRefreshing: true onRefreshingChanged: { if (refreshing) { - if (manager.credentialStatus === QMLManager.CS_VERIFIED) { + if (prefs.credentialStatus === QMLPrefs.CS_VERIFIED) { console.log("User pulled down dive list - syncing with cloud storage") detailsWindow.endEditMode() manager.saveChangesCloud(true) console.log("done syncing, turn off spinner") refreshing = false } else { - console.log("sync with cloud storage requested, but credentialStatus is " + manager.credentialStatus) + console.log("sync with cloud storage requested, but credentialStatus is " + prefs.credentialStatus) console.log("no syncing, turn off spinner") refreshing = false } @@ -339,7 +339,8 @@ Kirigami.ScrollablePage { StartPage { id: startPage anchors.fill: parent - opacity: credentialStatus === QMLManager.CS_NOCLOUD || (credentialStatus === QMLManager.CS_VERIFIED) ? 0 : 1 + opacity: credentialStatus === QMLPrefs.CS_NOCLOUD || + (credentialStatus === QMLPrefs.CS_VERIFIED) ? 0 : 1 visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } } function setupActions() { @@ -347,7 +348,8 @@ Kirigami.ScrollablePage { page.actions.main = null page.actions.right = null page.title = qsTr("Cloud credentials") - } else if (manager.credentialStatus === QMLManager.CS_VERIFIED || manager.credentialStatus === QMLManager.CS_NOCLOUD) { + } else if (prefs.credentialStatus === QMLPrefs.CS_VERIFIED || + prefs.credentialStatus === QMLPrefs.CS_NOCLOUD) { page.actions.main = page.downloadFromDCAction page.actions.right = page.addDiveAction page.title = qsTr("Dive list") @@ -424,8 +426,9 @@ Kirigami.ScrollablePage { } onBackRequested: { - if (startPage.visible && diveListView.count > 0 && manager.credentialStatus !== QMLManager.CS_INCORRECT_USER_PASSWD) { - manager.credentialStatus = oldStatus + if (startPage.visible && diveListView.count > 0 && + prefs.credentialStatus !== QMLPrefs.CS_INCORRECT_USER_PASSWD) { + prefs.credentialStatus = oldStatus event.accepted = true; } if (!startPage.visible) { |