QML UI: show download page when device was plugged in

Unless, of course, the user was editing or adding a dive - that would
be annoying to have interrupted (even though, of course, it's the user
plugging in the device which would trigger this in the first place).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-08-06 18:38:52 -07:00
parent 76e81e5d53
commit 842210c80d

View file

@ -612,7 +612,13 @@ if you have network connectivity and want to sync your data to cloud storage."),
}
onPluggedInDeviceNameChanged: {
console.log("Show download page for device " + pluggedInDeviceName);
if (detailsWindow.state === 'edit' || detailsWindow.state === 'add') {
/* we're in the middle of editing / adding a dive */
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()
}
}
Component.onCompleted: {