Browse Source

fix(chat): increase minimum visible to guarantee that the chat needs to be scrollable when it has many messages. 5 visible messages can fetch little messages that scroll listeners are skipped whereas it should have been set.

Signed-off-by: Dorra Jaouad <dorra.jaoued7@gmail.com>
pull/16078/head
Dorra Jaouad 5 days ago
committed by backportbot[bot]
parent
commit
191c91ff85
  1. 2
      src/composables/useGetMessages.ts
  2. 2
      src/constants.ts

2
src/composables/useGetMessages.ts

@ -275,7 +275,7 @@ export function useGetMessagesProvider() {
if (messageId === firstContextMessageId) {
// message is the first one in the block, try to get some messages above
isInitialisingMessages.value = true
await getOldMessages(token, true, { messageId, threadId })
await getOldMessages(token, false, { messageId, threadId })
isInitialisingMessages.value = false
}
}

2
src/constants.ts

@ -42,7 +42,7 @@ export const SESSION = {
export const CHAT = {
FETCH_LIMIT: 100,
MINIMUM_VISIBLE: 5,
MINIMUM_VISIBLE: 20,
FETCH_OLD: 0,
FETCH_NEW: 1,
} as const

Loading…
Cancel
Save