Page MenuHomePhabricator

[lib] Handle `send*MessageActionTypes.started` in `reduceThreadActivity`
AbandonedPublic

Authored by atul on Oct 5 2023, 10:46 AM.
Tags
None
Referenced Files
F3509683: D9372.id31687.diff
Sat, Dec 21, 7:20 AM
Unknown Object (File)
Nov 21 2024, 6:03 AM
Unknown Object (File)
Nov 21 2024, 6:03 AM
Unknown Object (File)
Nov 21 2024, 6:02 AM
Unknown Object (File)
Oct 30 2024, 1:52 PM
Unknown Object (File)
Oct 28 2024, 10:46 AM
Unknown Object (File)
Oct 22 2024, 1:07 PM
Unknown Object (File)
Oct 22 2024, 9:18 AM
Subscribers

Details

Summary

Went through message-reducer to see on which actions messageStore.threads needed to be updated, and the two were A. updateThreadLastNavigatedActionType, which we already handled and B. the three send*MessageActionTypes.started actions here.

The logic here to set lastNavigatedTo and lastPruned matches that of https://github.com/CommE2E/comm/blob/master/lib/reducers/message-reducer.js#L984

Test Plan

Verified with logging and Redux DevTools that ThreadActivityStore was updated as expected on SEND_TEXT_MESSAGE_STARTED:

4d39a3.png (938×1 px, 214 KB)

Note that the lastPruned value is being updated here because it hasn't yet been set to initial value. In subsequent diffs will handle adding threadID entry to ThreadActivityStore and removing entry from ThreadActivityStore (eg when user leaves thread). Lot of the work to be done here is interdependent, so there doesn't seem to be an obvious way to sequence things. Starting with the simplest things first, will test thoroughly against messageStore.threads before ripping that out.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage