Page MenuHomePhabricator

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

Authored by atul on Oct 11 2023, 1:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 18, 6:02 AM
Unknown Object (File)
Fri, Apr 18, 2:45 AM
Unknown Object (File)
Fri, Apr 18, 1:32 AM
Unknown Object (File)
Thu, Apr 17, 11:40 PM
Unknown Object (File)
Thu, Apr 17, 12:07 AM
Unknown Object (File)
Wed, Apr 9, 7:30 AM
Unknown Object (File)
Tue, Apr 8, 12:59 PM
Unknown Object (File)
Wed, Mar 26, 12:27 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