Skip to content
Snippets Groups Projects

VLCDefaults

Open Craig Reyenga requested to merge craig_r/vlc-ios:craig_r/user-defaults into master

This MR is a proposal to remove direct use of UserDefaults, and instead access values through a wrapper VLCDefaults.

Pros:

  • Allows simple dot notation to get and set values.
  • Defaults which are accessed with composite keys use reliable functions instead of string building in various places in the codebase
  • AppDelegate no longer needs the big dictionary in it
  • Ownership is in Swift; Objective-C is a client instead of the other way around
  • not included in this MR: objects can be serialized and deserialized reliably using swift Codable.
  • not included in this MR: can be made observable, possibly even on a per-property basis.

Cons:

  • Causes churn.
  • No user facing benefit.
  • Potential for mistakes during refactor

If this is wanted, I will continue.

Edited by Craig Reyenga

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading