react-native-manga-reader-app
react-native-manga-reader-app copied to clipboard
(refactor): use a map of chapters with list of refs
- somewhat similar to how mangas work
- significantly simplify merge logic for chapters as we just need to
update the map entry and then update the list of refs to the new
order directly
- this also handles arbitrary additions of new chapters anywhere in the list (that the previous version did not)
This is the more optimal fix for #21 and a follow-up PR to the simple fix in #22 .
WIP status as this is currently blocked by at least https://github.com/agilgur5/mst-persist/pull/16 as it requires the persisted data to be migrated to the new format. That PR adds transforms to mst-persist, on top of which we can add migrations. Still need to think about how to version the data appropriately.