Add Defaults.updatesAll()
to only listen to the keys registered in Defaults.Keys
#42
Labels
enhancement
New feature or request
UserDefaults.didChangeNotification
triggers for any kind of user defaults change in the process. Even for included SDK or even Apple's APIs. This makes it both inefficient and dangerous. I just had an infinite loop where I was listening toUserDefaults.didChangeNotification
and in the handler, it was settingbutton.imagePosition
and apparently setting that properly causes a userdefault to be set internally, which resulted in an infinite loop.I think it would be better to only listen to the keys we know about.
The text was updated successfully, but these errors were encountered: