Page MenuHomePhabricator

[web][keyserver] Use entries from the initial state only if they are missing from the store
ClosedPublic

Authored by tomek on May 22 2024, 4:41 AM.
Tags
None
Referenced Files
F3390818: D12170.id40526.diff
Sat, Nov 30, 1:03 AM
Unknown Object (File)
Mon, Nov 25, 11:45 AM
Unknown Object (File)
Sat, Nov 23, 10:17 AM
Unknown Object (File)
Sat, Nov 23, 3:21 AM
Unknown Object (File)
Sat, Nov 23, 3:07 AM
Unknown Object (File)
Sat, Nov 23, 2:52 AM
Unknown Object (File)
Fri, Nov 22, 5:06 AM
Unknown Object (File)
Sun, Nov 10, 11:48 AM
Subscribers

Details

Summary

This is the last step of the migration - we should no longer use the values returned from the initial Redux state.

Depends on D12153

https://linear.app/comm/issue/ENG-3486/move-entrystore-to-sqlite

Test Plan

Closed and opened the app (both native and web) - the entries aren't sent from the keyserver so doing this verified if they are correctly persisted and rehydrated.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.May 22 2024, 4:58 AM
This revision is now accepted and ready to land.May 22 2024, 7:17 AM
keyserver/src/responders/redux-state-responders.js
223 ↗(On Diff #40527)

We still should return this because we don't persist it on web

keyserver/src/responders/redux-state-responders.js
223 ↗(On Diff #40527)

If it's always 0, is it something we can just insert automatically on the web side?

keyserver/src/responders/redux-state-responders.js
223 ↗(On Diff #40527)

Yes, that makes sense!

keyserver/src/responders/redux-state-responders.js
223 ↗(On Diff #40527)

We insert this value on the web automatically by having it in the defaultWebState. Here we still should return this value so that the finalEntryStorePromise returns Promise<EntryStore>.