Closed d2dyno1 closed 2 years ago
I'm writing the changelog for this PR, and I've realized that: "SettingsBase now only persists values when they've changed in memory"
is new behavior, not just an optimization. Now you can't use values in memory to overwrite what's on disk (in case someone else changed it), unless you call the setter and make the value dirty.
I think this needs to be a flag that's disabled by default, otherwise this change could break things for some people.
Changelog added here: https://github.com/Arlodotexe/OwlCore/commit/5d25d39e0adbff4ffb1eafc9f4c54c76c713d7cf
This PR adds some improvements and silent fixes to
SettingsBase
class:record class
with additionalIsDirty
property that determines whether to write the setting value or not.ReadFileAsStringAsync()
now decodes strings takingbytesRead
into consideration.LoadAsync()
(previously only checked for "Type").