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, May 17, 8:23 AM
Unknown Object (File)
Apr 13 2024, 5:37 AM
Unknown Object (File)
Apr 6 2024, 5:02 AM
Unknown Object (File)
Mar 31 2024, 6:44 PM
Unknown Object (File)
Mar 31 2024, 6:27 AM
Unknown Object (File)
Mar 17 2024, 10:54 AM
Unknown Object (File)
Mar 14 2024, 10:16 PM
Unknown Object (File)
Mar 14 2024, 10:15 PM
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.