Commit 50bce556 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kcm] Fix showing no adapters message

We cannot rely on the number of adaptors since that changes with the
bluetooth state, but we can infer that no adapters are there based on
the rfkill state
parent af0edc50
......@@ -41,7 +41,9 @@ ScrollViewKCM {
Kirigami.PlaceholderMessage {
id: noBluetoothMessage
visible: !BluezQt.Manager.rfkill.state === BluezQt.Rfkill.Unknown && BluezQt.Manager.adapters.length === 0
// We cannot use the adapter count here because that can be zero when
// bluetooth is disabled even when there are physical devices
visible: BluezQt.Manager.rfkill.state === BluezQt.Rfkill.Unknown
text: i18n("No Bluetooth adapters found")
width: parent.width - (Kirigami.Units.largeSpacing * 4)
anchors.centerIn: parent
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment