Timeline: Use messageChangeCounter to mark messages read less often

This commit is contained in:
Scott Nonnenberg 2022-05-11 15:41:45 -07:00 committed by GitHub
parent 69d0ed3309
commit af2c884c9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 162 additions and 6 deletions

View file

@ -828,6 +828,7 @@ export function _conversationMessagesSelector(
): TimelinePropsType {
const {
isNearBottom,
messageChangeCounter,
messageIds,
messageLoadingState,
metrics,
@ -860,6 +861,7 @@ export function _conversationMessagesSelector(
haveOldest,
isNearBottom,
items,
messageChangeCounter,
messageLoadingState,
oldestUnseenIndex:
isNumber(oldestUnseenIndex) && oldestUnseenIndex >= 0
@ -899,6 +901,7 @@ export const getConversationMessagesSelector = createSelector(
return {
haveNewest: false,
haveOldest: false,
messageChangeCounter: 0,
messageLoadingState: TimelineMessageLoadingState.DoingInitialLoad,
scrollToIndexCounter: 0,
totalUnseen: 0,