diff --git a/lib/reducers/message-reducer.js b/lib/reducers/message-reducer.js --- a/lib/reducers/message-reducer.js +++ b/lib/reducers/message-reducer.js @@ -112,7 +112,7 @@ return threads; } -function threadIsWatched( +function isThreadWatched( threadID: string, threadInfo: ?RawThreadInfo, watchedIDs: $ReadOnlyArray, @@ -162,7 +162,7 @@ const threadInfo = threadInfos[threadID]; if ( threads[threadID] || - !threadIsWatched(threadID, threadInfo, watchedIDs) + !isThreadWatched(threadID, threadInfo, watchedIDs) ) { continue; } @@ -289,7 +289,7 @@ const unshimmedNewMessages = unshimMessageInfos(newMessageInfos); const unshimmedNewMessagesOfWatchedThreads = unshimmedNewMessages.filter( msg => - threadIsWatched( + isThreadWatched( msg.threadID, threadInfos[msg.threadID], watchedThreadIDs, @@ -579,7 +579,7 @@ messageStoreOperations.push(...reassignMessagesOps); const watchedIDs = [...threadWatcher.getWatchedIDs(), ...reassignedThreadIDs]; const watchedThreadInfos = _pickBy((threadInfo: RawThreadInfo) => - threadIsWatched(threadInfo.id, threadInfo, watchedIDs), + isThreadWatched(threadInfo.id, threadInfo, watchedIDs), )(threadInfos); const filteredThreads = _pick(Object.keys(watchedThreadInfos))( @@ -601,7 +601,7 @@ for (const threadID in threadInfos) { const threadInfo = threadInfos[threadID]; if ( - threadIsWatched(threadID, threadInfo, watchedIDs) && + isThreadWatched(threadID, threadInfo, watchedIDs) && !filteredThreads[threadID] ) { filteredThreads[threadID] = {