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
F3178178: D9801.id33338.diff
Fri, Nov 8, 1:06 AM
F3178062: D9801.id33289.diff
Fri, Nov 8, 12:50 AM
F3177466: D9801.id33012.diff
Thu, Nov 7, 11:28 PM
F3176955: D9801.diff
Thu, Nov 7, 10:08 PM
Unknown Object (File)
Sun, Oct 27, 5:21 PM
Unknown Object (File)
Oct 5 2024, 8:05 AM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
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
No Lint Coverage
Unit
No Test Coverage

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

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.