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
F3369015: D9801.id33289.diff
Mon, Nov 25, 9:24 PM
Unknown Object (File)
Mon, Nov 25, 7:47 PM
Unknown Object (File)
Sun, Nov 24, 3:38 PM
Unknown Object (File)
Wed, Nov 20, 2:55 PM
Unknown Object (File)
Fri, Nov 8, 1:06 AM
Unknown Object (File)
Fri, Nov 8, 12:50 AM
Unknown Object (File)
Thu, Nov 7, 11:28 PM
Unknown Object (File)
Thu, Nov 7, 10:08 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.