summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-08 06:08:15 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-11 11:14:22 -0700
commite19944ce14d280d1ee88e91cd1318d917f0f2957 (patch)
tree9ce147f9f85ce9d499b568bc94b729d193ce7234
parent593978a473689f87b1bc7a3f11c56e36eb482970 (diff)
downloadsubsurface-e19944ce14d280d1ee88e91cd1318d917f0f2957.tar.gz
QML UI: when triggering download page, set up vendor/product/connection
This only works if the USB device contains enough information to do so. We need to collect more information to understand what information we get if those get plugged in. Maybe we'll get only the vendor and need to leave it to the user to set the product (which we can do by passing an index of -1 for product). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/main.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 069024cc8..332e4c921 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -617,7 +617,13 @@ if you have network connectivity and want to sync your data to cloud storage."),
console.log("Download page requested by Android Intent, but adding/editing dive; no action taken")
} else {
console.log("Show download page for device " + pluggedInDeviceName)
- diveList.showDownloadPage()
+ /* if we recognized the device, we'll pass in a triple of ComboBox indeces as "vendor;product;connection" */
+ var vendorProductConnection = pluggedInDeviceName.split(';')
+ if (vendorProductConnection.length === 3)
+ diveList.showDownloadPage(vendorProductConnection[0], vendorProductConnection[1], vendorProductConnection[2])
+ else
+ diveList.showDownloadPage()
+ console.log("done showing download page")
}
}