Page MenuHomePhabricator

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

Authored by atul on Oct 11 2023, 1:52 PM.
Tags
None
Referenced Files
F3887446: D9454.id32093.diff
Fri, Jan 24, 8:15 AM
F3887441: D9454.id32201.diff
Fri, Jan 24, 8:14 AM
F3887439: D9454.id31943.diff
Fri, Jan 24, 8:14 AM
F3887428: D9454.id.diff
Fri, Jan 24, 8:14 AM
F3887407: D9454.diff
Fri, Jan 24, 8:11 AM
Unknown Object (File)
Sat, Jan 18, 1:59 AM
Unknown Object (File)
Dec 17 2024, 7:55 PM
Unknown Object (File)
Dec 17 2024, 7:55 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable