Skip to content

Commit

Permalink
- UserDefaults.standard
Browse files Browse the repository at this point in the history
  • Loading branch information
stormychel committed Sep 21, 2024
1 parent 1c533ed commit 0c76058
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/KeyboardShortcuts/KeyboardShortcuts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ public enum KeyboardShortcuts {
registeredShortcuts.removeAll()

Check warning on line 133 in Sources/KeyboardShortcuts/KeyboardShortcuts.swift

View workflow job for this annotation

GitHub Actions / lint

Trailing Whitespace Violation: Lines should not have trailing whitespace (trailing_whitespace)
// remove user defaults too
let userDefaults = UserDefaults.standard

for key in userDefaults.dictionaryRepresentation().keys where key.hasPrefix("KeyboardShortcuts_") {
UserDefaults.standard.removeObject(forKey: key)
userDefaults.removeObject(forKey: key)
}
}

Expand Down

0 comments on commit 0c76058

Please sign in to comment.