Open
Conversation
It would be nice to have a `Storage` type that stores the values in a dictionary within an array, stored by another object. The main use of this would be storing values in UserDefaults/NSUbiquitousKeyValueStore as an array of dictionaries to enable smaller diffs when a single values changes, support update listeners for each property, and easily store the order of values
Enables consumers to utilise `UserDefaults`-related types as necessary without adding too my many types when importing `Persist`
`UserDefaultsMappedArrayStorageTests.testArrayPropertyUpdates` is currently failing. Need to figure out how many times this is expected to be called
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
===========================================
- Coverage 99.54% 70.44% -29.10%
===========================================
Files 25 31 +6
Lines 1318 1587 +269
===========================================
- Hits 1312 1118 -194
- Misses 6 469 +463
Continue to review full report at Codecov.
|
Should fix multithreading access
Publishes the `Value` and uses a `CurrentValueSubject`
Locks could provide better protections around reading then writing while another thread is writing but is also less understood by me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a branch I'm using in Nevis and other apps I'm developing.
I am not aware of any issues, but I would like to improve the API (where possible) prior to merging.