From 0673e53a68ef8c399304e1e542c0b9e79cf6d92b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 2 Apr 2020 15:26:43 -0700 Subject: [PATCH] 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 --- mobile-widgets/qml/main.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 81d08140d..27e5c4d57 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -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() + } } }