mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Fix remove keybind matching in notification history
This commit is contained in:
@@ -102,8 +102,13 @@ QtObject {
|
||||
}
|
||||
|
||||
function checkKey(event, settingName, settings) {
|
||||
// Map simplified names to the actual setting property names
|
||||
var propName = "key" + settingName.charAt(0).toUpperCase() + settingName.slice(1);
|
||||
// Accept both simplified names ("remove") and full property names ("keyRemove")
|
||||
// so callers are less error-prone.
|
||||
var normalized = String(settingName || "");
|
||||
if (!normalized)
|
||||
return false;
|
||||
|
||||
var propName = normalized.startsWith("key") ? normalized : ("key" + normalized.charAt(0).toUpperCase() + normalized.slice(1));
|
||||
var boundKeys = settings.data.general.keybinds[propName];
|
||||
if (!boundKeys || boundKeys.length === 0)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user