Bluetooth: Removed the copy of the adapter's state in Settings, makes code much simpler and robust by always relying on the actual adapter's state.

This commit is contained in:
ItsLemmy
2025-09-27 17:33:09 -04:00
parent fafd7a518b
commit e73d85de04
6 changed files with 13 additions and 50 deletions
+2 -2
View File
@@ -44,13 +44,13 @@ NPanel {
NToggle {
id: bluetoothSwitch
checked: Settings.data.network.bluetoothEnabled
checked: BluetoothService.enabled
onToggled: checked => BluetoothService.setBluetoothEnabled(checked)
baseSize: Style.baseWidgetSize * 0.65 * scaling
}
NIconButton {
enabled: Settings.data.network.bluetoothEnabled
enabled: BluetoothService.enabled
icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "refresh"
tooltipText: I18n.tr("tooltips.refresh-devices")
baseSize: Style.baseWidgetSize * 0.8