Page MenuHomePhabricator

[lib] Exclusively use "ops approach" in `reduceThreadUpdates`
ClosedPublic

Authored by atul on Jun 2 2022, 3:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 20, 4:23 PM
Unknown Object (File)
Thu, Sep 19, 1:18 PM
Unknown Object (File)
Thu, Sep 19, 12:01 AM
Unknown Object (File)
Sep 2 2024, 6:47 PM
Unknown Object (File)
Sep 2 2024, 6:47 PM
Unknown Object (File)
Sep 2 2024, 6:47 PM
Unknown Object (File)
Sep 2 2024, 6:47 PM
Unknown Object (File)
Sep 2 2024, 6:47 PM

Details

Summary

reduceThreadUpdates used to return both an updated threadStore object and corresponding threadStoreOperations. reduceThreadUpdates has a single callsite and that's in reduceThreadStore where only the threadStoreOperations property of the returned object was being pulled out anyways... so in this diff we remove the updated object to clean things up.

(Since this function is no longer really a "reducer," we'll rename this to something like generateOpsForThreadUpdates)


Depends on D4196

Test Plan

assertThreadStoreThreadsAreEqual hasn't flagged anything since it's been included in staff builds so we can assume "the ops are good."

Diff Detail

Repository
rCOMM Comm
Branch
landjune7 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Jun 2 2022, 3:44 PM
tomek added inline comments.
lib/reducers/thread-reducer.js
132–135 ↗(On Diff #13312)

We should be able to always return threadOperations, right? If !someThreadUpdated it would be simply [].

This revision is now accepted and ready to land.Jun 3 2022, 2:57 AM

cherrypick before addressing feedback