Page MenuHomePhabricator

[native] stop persisting reports
ClosedPublic

Authored by kamil on May 23 2023, 4:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 6:08 AM
Unknown Object (File)
Mon, Dec 16, 6:08 AM
Unknown Object (File)
Mon, Dec 16, 6:08 AM
Unknown Object (File)
Mon, Dec 16, 6:08 AM
Unknown Object (File)
Mon, Dec 16, 6:00 AM
Unknown Object (File)
Nov 10 2024, 6:58 AM
Unknown Object (File)
Sep 29 2024, 1:18 AM
Unknown Object (File)
Sep 29 2024, 1:18 AM
Subscribers

Details

Summary

queuedReports are now stored in SQLite, but still we want to save enabledReports.

Depends on D7938

Test Plan

Check is persisting works for enabledReports and queuedReports are not persisted.

Also, with this diff I tested entire stack end-to-end.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.May 23 2023, 4:56 PM
native/redux/persist.js
617–625 ↗(On Diff #26861)

Would this be easier to achieve by handling rehydrateActionType in the reducer? Or is there some benefit from doing it via a transform?

This revision is now accepted and ready to land.May 24 2023, 3:20 AM

rebase before landing

native/redux/persist.js
617–625 ↗(On Diff #26861)

Would this be easier to achieve by handling rehydrateActionType in the reducer?

I don't think so, rehydrateActionType is not enough, we will also need to do something on persist/PERSIST action.

Or is there some benefit from doing it via a transform?

We need to remove reports before persisting, and add an empty array on rehydration - that's why this transform has two callbacks (inbound and outbound).

I think the benefit is that we use the proper tools for our usage - using actions persist/PERSIST and persist/REHYDRATE is less readable for me.

This revision was automatically updated to reflect the committed changes.