Page MenuHomePhabricator

[lib] Simplify logic in `mapThreadsToMessageIDsFromOrderedMessageInfos`
AbandonedPublic

Authored by atul on Jun 22 2022, 3:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 3:03 PM
Unknown Object (File)
Fri, Nov 8, 3:02 PM
Unknown Object (File)
Fri, Nov 8, 2:59 PM
Unknown Object (File)
Thu, Oct 17, 7:40 PM
Unknown Object (File)
Oct 3 2024, 12:43 PM
Unknown Object (File)
Sep 26 2024, 11:52 PM
Unknown Object (File)
Sep 23 2024, 10:26 PM
Unknown Object (File)
Sep 11 2024, 5:44 AM
Subscribers

Details

Summary

Pretty straightforward change.. reduces the number of lines of code (of which message-reducer has plenty)


Depends on D4335

Test Plan

Careful reading, made sure that this syntax works as expected:

813e3e.png (740×912 px, 251 KB)

Diff Detail

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

Event Timeline

atul requested review of this revision.Jun 22 2022, 3:36 PM
tomek added inline comments.
lib/reducers/message-reducer.js
106

It doesn't make too much sense to have threads[messageInfo.threadID] = threads[messageInfo.threadID] assignment - why do we need to assign a value to itself? (it might be confusing). Instead, we should be a little more explicit with our intention.

This revision is now accepted and ready to land.Jun 23 2022, 4:47 AM
abosh added inline comments.
lib/reducers/message-reducer.js
106

I agree.