Pre-allocated the list of program for performance.

This commit is contained in:
2025-02-06 23:03:45 -08:00
parent 1decb79a4e
commit cf2b5b8cec
3 changed files with 23 additions and 30 deletions

View File

@@ -281,8 +281,7 @@ class SettingsViewController: NSViewController,
override func viewWillAppear() {
super.viewWillAppear()
// PERF: Maybe we shouldn't fetch it on every appearance?
// Only do it in AppDelegate?
// Fetch the saved key codes and modifiers.
if let code = UserDefaults.standard.object(forKey: "keyCode") as? Int {
keyCode = code
}