From 94439df25d2bccb0e409a7938bda6ca6edebb0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 17 Jul 2018 17:30:43 +0200 Subject: [PATCH] Make bluetooth enable/disable message for iOS containing the app restart information --- .../ui/connection/BluetoothDiscoveryPage.qml | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/nymea-app/ui/connection/BluetoothDiscoveryPage.qml b/nymea-app/ui/connection/BluetoothDiscoveryPage.qml index 41625a6e..95c55207 100644 --- a/nymea-app/ui/connection/BluetoothDiscoveryPage.qml +++ b/nymea-app/ui/connection/BluetoothDiscoveryPage.qml @@ -43,13 +43,26 @@ Page { Label { Layout.fillWidth: true text: { - if (Engine.bluetoothDiscovery.bluetoothAvailable && Engine.bluetoothDiscovery.bluetoothEnabled) { - return qsTr("Searching for %1 boxes via Bluetooth LE.").arg(app.systemName) - } if (Engine.bluetoothDiscovery.bluetoothAvailable && !Engine.bluetoothDiscovery.bluetoothEnabled) { - return qsTr("Uh oh! Bluetooth is not enabled. Please enable the Bluetooth on this device and restart the application.") + + if (Qt.platform.os === "ios") { + if (Engine.bluetoothDiscovery.bluetoothAvailable && Engine.bluetoothDiscovery.bluetoothEnabled) { + return qsTr("Searching for %1 boxes via Bluetooth LE.").arg(app.systemName) + } if (Engine.bluetoothDiscovery.bluetoothAvailable && !Engine.bluetoothDiscovery.bluetoothEnabled) { + return qsTr("Uh oh! Bluetooth is not enabled. Please enable the Bluetooth on this device and restart the application.") + } else { + return qsTr("Uh oh! Bluetooth is not available. Please make sure Bluetooth is enabled on this device and restart the application.") + } } else { - return qsTr("Uh oh! Bluetooth is not available. Please make sure Bluetooth is enabled on this device and restart the application.") + if (Engine.bluetoothDiscovery.bluetoothAvailable && Engine.bluetoothDiscovery.bluetoothEnabled) { + return qsTr("Searching for %1 boxes via Bluetooth LE.").arg(app.systemName) + } if (Engine.bluetoothDiscovery.bluetoothAvailable && !Engine.bluetoothDiscovery.bluetoothEnabled) { + return qsTr("Uh oh! Bluetooth is not enabled. Please enable the Bluetooth on this device.") + } else { + return qsTr("Uh oh! Bluetooth is not available. Please make sure Bluetooth is enabled on this device.") + } } + + } wrapMode: Text.WordWrap