feat: added feature to set keyboard shortcut to open/close popup window (#1976)

This commit is contained in:
Serhiy Mytrovtsiy
2025-01-20 17:04:55 +01:00
parent b4c835e97d
commit 58ad6c568b
25 changed files with 346 additions and 39 deletions

View File

@@ -37,6 +37,10 @@ public class Store {
return (!self.exist(key: key) ? value : defaults.integer(forKey: key))
}
public func array(key: String, defaultValue value: [Any]) -> [Any] {
return (!self.exist(key: key) ? value : defaults.array(forKey: key)!)
}
public func data(key: String) -> Data? {
return defaults.data(forKey: key)
}
@@ -57,6 +61,10 @@ public class Store {
self.defaults.set(value, forKey: key)
}
public func set(key: String, value: [Any]) {
self.defaults.set(value, forKey: key)
}
public func reset() {
self.defaults.dictionaryRepresentation().keys.forEach { key in
self.defaults.removeObject(forKey: key)