Make bluetooth enable/disable message for iOS containing the app restart information

This commit is contained in:
Simon Stürz 2018-07-17 17:30:43 +02:00
parent ca2c36420d
commit 94439df25d

View File

@ -43,6 +43,8 @@ Page {
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
text: { text: {
if (Qt.platform.os === "ios") {
if (Engine.bluetoothDiscovery.bluetoothAvailable && Engine.bluetoothDiscovery.bluetoothEnabled) { if (Engine.bluetoothDiscovery.bluetoothAvailable && Engine.bluetoothDiscovery.bluetoothEnabled) {
return qsTr("Searching for %1 boxes via Bluetooth LE.").arg(app.systemName) return qsTr("Searching for %1 boxes via Bluetooth LE.").arg(app.systemName)
} if (Engine.bluetoothDiscovery.bluetoothAvailable && !Engine.bluetoothDiscovery.bluetoothEnabled) { } if (Engine.bluetoothDiscovery.bluetoothAvailable && !Engine.bluetoothDiscovery.bluetoothEnabled) {
@ -50,6 +52,17 @@ Page {
} else { } else {
return qsTr("Uh oh! Bluetooth is not available. Please make sure Bluetooth is enabled on this device and restart the application.") return qsTr("Uh oh! Bluetooth is not available. Please make sure Bluetooth is enabled on this device and restart the application.")
} }
} else {
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 wrapMode: Text.WordWrap