diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -1829,24 +1829,24 @@ if (!allowOlmViaTunnelbrokerForDMs) { return []; } - const supports = []; - const needFetch = []; + const userSupportingThickThreads = []; + const usersNeedsFetch = []; for (const userID of userIDs) { if (userHasDeviceList(userID, auxUserInfos)) { - supports.push(userID); + userSupportingThickThreads.push(userID); } else { - needFetch.push(userID); + usersNeedsFetch.push(userID); } } - if (needFetch.length > 0) { - const { identities } = await findUserIdentities(needFetch); - for (const userID of needFetch) { + if (usersNeedsFetch.length > 0) { + const { identities } = await findUserIdentities(usersNeedsFetch); + for (const userID of usersNeedsFetch) { if (identities[userID]) { - supports.push(userID); + userSupportingThickThreads.push(userID); } } } - return supports; + return userSupportingThickThreads; }, [allowOlmViaTunnelbrokerForDMs, auxUserInfos, findUserIdentities], ); @@ -1919,4 +1919,5 @@ isMemberActive, createThreadTimestamps, userHasDeviceList, + useUserSupportThickThread, }; diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js --- a/native/chat/chat-thread-list.react.js +++ b/native/chat/chat-thread-list.react.js @@ -279,8 +279,6 @@ ], ); - const allowOlmViaTunnelbrokerForDMs = useAllowOlmViaTunnelbrokerForDMs(); - const listData: $ReadOnlyArray = React.useMemo(() => { const chatThreadItems = getThreadListSearchResults( boundChatListData, @@ -289,7 +287,6 @@ threadSearchResults, usersSearchResults, loggedInUserInfo, - allowOlmViaTunnelbrokerForDMs, ); const chatItems: Item[] = [...chatThreadItems]; @@ -304,7 +301,6 @@ return chatItems; }, [ - allowOlmViaTunnelbrokerForDMs, boundChatListData, emptyItem, filterThreads,