summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-18 11:29:37 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-24 08:25:51 +0900
commita4d299e01e216ef2db61d98d304d091da39ee51d (patch)
tree7d680274c18599ee96c4d8353e30636e6ab01cb1 /mobile-widgets/qml/main.qml
parentab28008679a6100c14ef0a8fb6ebdb7260a7dd35 (diff)
downloadsubsurface-a4d299e01e216ef2db61d98d304d091da39ee51d.tar.gz
mobile-widgets/qml: use showPin/oldStatus consistently
Remove aliases for showPin/oldStatus and reference prefs.showPin/oldStatus directly. showPin/oldStatus are "temporary" variables, that are not saved in settings, so they easily be replaced Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qml/main.qml')
-rw-r--r--mobile-widgets/qml/main.qml8
1 files changed, 3 insertions, 5 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 16643e5dc..10ea9bb16 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -26,11 +26,9 @@ Kirigami.ApplicationWindow {
pageStack.globalToolBar.preferredHeight: Math.round(Kirigami.Units.gridUnit * (Qt.platform.os == "ios" ? 2 : 1.5))
pageStack.globalToolBar.maximumHeight: Kirigami.Units.gridUnit * 2
- property alias oldStatus: prefs.oldStatus
property alias notificationText: manager.notificationText
property alias locationServiceEnabled: manager.locationServiceEnabled
property alias pluggedInDeviceName: manager.pluggedInDeviceName
- property alias showPin: prefs.showPin
property alias defaultCylinderIndex: settingsWindow.defaultCylinderIndex
property bool filterToggle: false
property string filterPattern: ""
@@ -249,8 +247,8 @@ Kirigami.ApplicationWindow {
if (prefs.credentialStatus == CloudStatus.CS_UNKNOWN) {
// the user has asked to change credentials - if the credentials before that
// were valid, go back to dive list
- if (oldStatus == CloudStatus.CS_VERIFIED) {
- prefs.credentialStatus = oldStatus
+ if (prefs.oldStatus == CloudStatus.CS_VERIFIED) {
+ prefs.credentialStatus = prefs.oldStatus
}
}
returnTopPage()
@@ -334,7 +332,7 @@ Kirigami.ApplicationWindow {
onTriggered: {
if (prefs.credentialStatus === CloudStatus.CS_NOCLOUD) {
returnTopPage()
- oldStatus = prefs.credentialStatus
+ prefs.oldStatus = prefs.credentialStatus
manager.startPageText = "Enter valid cloud storage credentials"
prefs.credentialStatus = CloudStatus.CS_UNKNOWN
globalDrawer.close()