[lib] Fix useThreadsWithPermission check
Summary:
This check is currently equivalent to a threadTypeIsCommunityRoot check. I initially gleaned this by reading the code, but I verified it by comparing the two checks for each thread in my ThreadStore on production. The reason is that communityRootMembersToRole only contains entries for community roots, and all community roots have at least one admin.
This is probably the wrong check for us to making here. We should probably treat the channels inside the community root the same as we treat the community. Additionally, we should probably carve out an exception for channels inside GENESIS, which we generally treat the same as thick threads (for the purposes of determining whether to freeze the chat due to there being only one other member, and that member has blocked you).
Depends on D13874
Test Plan: I deployed a custom environment to comm.software where I could run React profiling on the production dataset as described here. I confirmed this change reduced rerender time from 3.0s to 0.5s
Reviewers: tomek, angelika
Reviewed By: tomek
Differential Revision: https://phab.comm.dev/D13886