summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveList.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-09 10:46:17 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-09 12:40:44 -0700
commit174bb913260a42c8159b8d5a46461d65ff54407d (patch)
treed5f3f6c83ef2aed034b0fb1286202cdebc4cc67b /mobile-widgets/qml/DiveList.qml
parent93080f129d3092a8d1c78d43469aeef1f3e2a899 (diff)
downloadsubsurface-174bb913260a42c8159b8d5a46461d65ff54407d.tar.gz
mobile UI: move code to open download page on device plug-in
This makes the code easier to reuse and uses the helper we just added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r--mobile-widgets/qml/DiveList.qml16
1 files changed, 1 insertions, 15 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 7bf79671c..ae866f23c 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -508,20 +508,6 @@ Kirigami.ScrollablePage {
}
}
- function showDownloadPage(vendor, product, connection) {
- downloadFromDc.dcImportModel.clearTable()
- pageStack.push(downloadFromDc)
- if (vendor !== undefined && product !== undefined && connection !== undefined) {
- /* set up the correct values on the download page */
- if (vendor !== -1)
- downloadFromDc.vendor = vendor
- if (product !== -1)
- downloadFromDc.product = product
- if (connection !== -1)
- downloadFromDc.connection = connection
- }
- }
-
property QtObject downloadFromDCAction: Kirigami.Action {
icon {
name: ":/icons/downloadDC"
@@ -529,7 +515,7 @@ Kirigami.ScrollablePage {
}
text: qsTr("Download dives")
onTriggered: {
- showDownloadPage()
+ rootItem.showDownloadPage()
}
}