Page MenuHomePhabricator

[native] stop persisting reports
ClosedPublic

Authored by kamil on May 23 2023, 4:00 AM.
Tags
None
Referenced Files
F1571764: D7939.diff
Thu, Apr 18, 8:39 AM
Unknown Object (File)
Tue, Apr 16, 9:53 AM
Unknown Object (File)
Tue, Apr 16, 2:54 AM
Unknown Object (File)
Mon, Apr 15, 4:22 PM
Unknown Object (File)
Mon, Apr 15, 3:34 AM
Unknown Object (File)
Sat, Apr 13, 12:20 PM
Unknown Object (File)
Sat, Apr 13, 10:59 AM
Unknown Object (File)
Sat, Apr 13, 3:40 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
Lint Not Applicable
Unit
Tests Not Applicable

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.