mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Refactor pre-commit hooks to use prek (#976)
* ci: change to prek for pre-commit * refactor: fix shellcheck warnings for the scripts * chore: unify whitespace formatting * nix: add prek to dev shell
This commit is contained in:
@@ -161,7 +161,7 @@ Rectangle {
|
||||
|
||||
const pins = SettingsData.bluetoothDevicePins || {}
|
||||
const pinnedAddr = pins["preferredDevice"]
|
||||
|
||||
|
||||
let devices = [...BluetoothService.adapter.devices.values.filter(dev => dev && (dev.paired || dev.trusted))]
|
||||
devices.sort((a, b) => {
|
||||
// Pinned device first
|
||||
@@ -337,13 +337,13 @@ Rectangle {
|
||||
onClicked: {
|
||||
const pins = JSON.parse(JSON.stringify(SettingsData.bluetoothDevicePins || {}))
|
||||
const isCurrentlyPinned = pins["preferredDevice"] === modelData.address
|
||||
|
||||
|
||||
if (isCurrentlyPinned) {
|
||||
delete pins["preferredDevice"]
|
||||
} else {
|
||||
pins["preferredDevice"] = modelData.address
|
||||
}
|
||||
|
||||
|
||||
SettingsData.set("bluetoothDevicePins", pins)
|
||||
}
|
||||
}
|
||||
@@ -642,4 +642,4 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,4 +163,4 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user