Scroll to bottom of conversation on message send
This commit is contained in:
parent
254c87a1ac
commit
5bd7eda124
13 changed files with 107 additions and 21 deletions
|
@ -824,6 +824,7 @@ export function _conversationMessagesSelector(
|
|||
messageIds,
|
||||
metrics,
|
||||
resetCounter,
|
||||
scrollToBottomCounter,
|
||||
scrollToMessageId,
|
||||
scrollToMessageCounter,
|
||||
} = conversation;
|
||||
|
@ -862,7 +863,7 @@ export function _conversationMessagesSelector(
|
|||
isLoadingMessages,
|
||||
loadCountdownStart,
|
||||
items,
|
||||
isNearBottom,
|
||||
isNearBottom: isNearBottom || false,
|
||||
messageHeightChangeIndex:
|
||||
isNumber(messageHeightChangeIndex) && messageHeightChangeIndex >= 0
|
||||
? messageHeightChangeIndex
|
||||
|
@ -872,6 +873,7 @@ export function _conversationMessagesSelector(
|
|||
? oldestUnreadIndex
|
||||
: undefined,
|
||||
resetCounter,
|
||||
scrollToBottomCounter,
|
||||
scrollToIndex:
|
||||
isNumber(scrollToIndex) && scrollToIndex >= 0 ? scrollToIndex : undefined,
|
||||
scrollToIndexCounter: scrollToMessageCounter,
|
||||
|
@ -907,10 +909,16 @@ export const getConversationMessagesSelector = createSelector(
|
|||
haveNewest: false,
|
||||
haveOldest: false,
|
||||
isLoadingMessages: false,
|
||||
isNearBottom: false,
|
||||
items: [],
|
||||
loadCountdownStart: undefined,
|
||||
messageHeightChangeIndex: undefined,
|
||||
oldestUnreadIndex: undefined,
|
||||
resetCounter: 0,
|
||||
scrollToBottomCounter: 0,
|
||||
scrollToIndex: undefined,
|
||||
scrollToIndexCounter: 0,
|
||||
totalUnread: 0,
|
||||
items: [],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue