HomePhabricator
Diffusion Comm 6a3fd495294b

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

Description

[native] Update pruneThreadIDsSelector to use threadActivityStore

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.

Reviewers: ashoat, tomek, rohan, ginsu

Reviewed By: ashoat

Subscribers: wyilio, ashoat

Differential Revision: https://phab.comm.dev/D9454