mobile UI: only test for plugged in USB serial device on Android

This test makes no sense on other platforms (and the log file text is
frankly confusing when not running on Android).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-04-02 15:26:43 -07:00
parent ac9df93a13
commit 0673e53a68

View file

@ -730,11 +730,14 @@ if you have network connectivity and want to sync your data to cloud storage."),
manager.appendTextToLog("initialization completed - showing the dive list")
showPage(diveList) // we want to make sure that gets on the stack
diveList.diveListModel = diveModel
manager.appendTextToLog("if we got started by a plugged in device, switch to download page -- pluggedInDeviceName = " + pluggedInDeviceName)
if (pluggedInDeviceName !== "")
// if we were started with a dive computer plugged in,
// immediately switch to download page
showDownloadForPluggedInDevice()
if (Qt.platform.os === "android") {
manager.appendTextToLog("if we got started by a plugged in device, switch to download page -- pluggedInDeviceName = " + pluggedInDeviceName)
if (pluggedInDeviceName !== "")
// if we were started with a dive computer plugged in,
// immediately switch to download page
showDownloadForPluggedInDevice()
}
}
}