mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
593978a473
commit
e19944ce14
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
/* 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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue