mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Bluetooth: proper synchronisation of the adapter state with the cached setting
This commit is contained in:
@@ -75,7 +75,7 @@ NPanel {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
visible: !Settings.data.network.bluetoothEnabled
|
||||
visible: !(BluetoothService.adapter && BluetoothService.adapter.enabled)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: Color.transparent
|
||||
|
||||
@@ -32,6 +32,16 @@ Singleton {
|
||||
|
||||
function init() {
|
||||
Logger.log("Bluetooth", "Service initialized")
|
||||
delaySyncState.running = true
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: delaySyncState
|
||||
interval: 1000
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
Settings.data.network.bluetoothEnabled = adapter.enabled
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
||||
Reference in New Issue
Block a user