Page MenuHomePhabricator

[native] stop persisting reports
ClosedPublic

Authored by kamil on May 23 2023, 4:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 20, 1:03 AM
Unknown Object (File)
Tue, Feb 20, 1:00 AM
Unknown Object (File)
Mon, Feb 19, 6:45 PM
Unknown Object (File)
Mon, Feb 19, 1:07 PM
Unknown Object (File)
Mon, Feb 19, 11:54 AM
Unknown Object (File)
Jan 1 2024, 2:28 PM
Unknown Object (File)
Jan 1 2024, 12:45 AM
Unknown Object (File)
Dec 21 2023, 3:34 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.