Page MenuHomePhabricator

[lib] refactor processing updates in `UserStore` to ops
ClosedPublic

Authored by kamil on Nov 9 2023, 6:19 AM.
Tags
None
Referenced Files
F1885645: D9801.diff
Tue, May 28, 9:34 AM
Unknown Object (File)
Tue, May 21, 2:00 AM
Unknown Object (File)
Tue, May 21, 2:00 AM
Unknown Object (File)
Tue, May 21, 2:00 AM
Unknown Object (File)
Tue, May 21, 2:00 AM
Unknown Object (File)
Tue, May 21, 1:50 AM
Unknown Object (File)
Tue, May 21, 1:00 AM
Unknown Object (File)
Mon, May 6, 3:23 AM
Subscribers

Details

Summary

Convert logic for ops approach.

Depends on D9800

Test Plan
  1. Login to two accounts that have friend relationship
  2. On second delete account
  3. On first make sure update is properly processed

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.Nov 10 2023, 1:54 AM
tomek requested changes to this revision.Nov 13 2023, 6:59 AM
tomek added inline comments.
lib/reducers/user-reducer.js
265 ↗(On Diff #33012)

There is a subtle bug here: if a user is added as a part of convertUserInfosToReplaceUserOps and isn't present in state.userInfos, we won't delete it as a part of generateOpsForUserUpdates. To solve this, we should modify generateOpsForUserUpdates so that it adds an op regardless of the provided state.

This revision now requires changes to proceed.Nov 13 2023, 6:59 AM
tomek added inline comments.
lib/reducers/user-reducer.js
163 ↗(On Diff #33289)

Do we need this parameter?

This revision is now accepted and ready to land.Nov 16 2023, 3:14 AM
This revision was landed with ongoing or failed builds.Nov 16 2023, 7:21 AM
This revision was automatically updated to reflect the committed changes.