Page MenuHomePhabricator

[native] Update `pruneThreadIDsSelector` to use `threadActivityStore`
ClosedPublic

Authored by atul on Oct 11 2023, 1:52 PM.
Tags
None
Referenced Files
F3399967: D9454.id32093.diff
Mon, Dec 2, 5:36 AM
F3399549: D9454.diff
Mon, Dec 2, 3:41 AM
Unknown Object (File)
Oct 30 2024, 4:51 AM
Unknown Object (File)
Oct 28 2024, 8:18 PM
Unknown Object (File)
Oct 25 2024, 1:14 AM
Unknown Object (File)
Oct 18 2024, 2:10 AM
Unknown Object (File)
Oct 2 2024, 1:05 PM
Unknown Object (File)
Oct 2 2024, 1:05 PM
Subscribers

Details

Summary

Update pruneThreadIDsSelector to use lastNavigatedTo from threadActivityStore instead of messageStore.threads.

Also as discussed w/ @ashoat, we can check threadMessageInfo.messageIDs.length instead of lastPruned to reduce unnecessarily adding threadIDs to threadIDsToPrune. lastPruned will be removed from threadActivityStore in a subsequent diff.


Depends on D9453

Test Plan

Change msInHour to small value to "trigger" pruning and log threadIDsToPrune. Verify pruning via Redux Devtools. Have done minimal preliminary testing, will test more thoroughly before landing.

Diff Detail

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