To enable search of chats by chat name and member name, we have in-memory JS search index. This search index needs to get updated when underlying Redux data changes, and it needs to ENS-resolve both member names and chat names.
I have 93 threads with ENS users. This resulted in a huge performance issue on my iOS device, since the thread search index was getting recalculated as each ENS name streamed in, one-by-one.
This diff makes it so we wait until all of the ENS fetches either resolve or time out before recalculcating the thread search index. This guaranteees that there will be at most 2 ThreadSearchIndex recalculations per update of the underlying Redux data (threadStore, userStore, and currentUserInfo).