Skip to content

Commit

Permalink
fix(chat): disable smooth scroll to bottom
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy authored and backportbot[bot] committed Oct 18, 2024
1 parent f19fb7d commit f57fb6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/ChatView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
:aria-label="t('spreed', 'Scroll to bottom')"
:title="t('spreed', 'Scroll to bottom')"
class="scroll-to-bottom__button"
@click="smoothScrollToBottom">
@click="scrollToBottom">
<template #icon>
<ChevronDoubleDown :size="20" />
</template>
Expand Down Expand Up @@ -198,8 +198,8 @@ export default {
this.$store.dispatch('initialiseUpload', { files, token: this.token, uploadId })
},
smoothScrollToBottom() {
EventBus.emit('scroll-chat-to-bottom', { smooth: true, force: true })
scrollToBottom() {
EventBus.emit('scroll-chat-to-bottom', { smooth: false, force: true })
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default {
}
// scroll to bottom if needed
this.scrollToBottom({ smooth: true })
this.scrollToBottom({ smooth: false })
if (this.conversation?.type === CONVERSATION.TYPE.NOTE_TO_SELF) {
this.$nextTick(() => {
Expand Down Expand Up @@ -639,7 +639,7 @@ export default {
if (!isFocused) {
// Safeguard 2: in case the fallback message is not found too
// scroll to bottom
this.scrollToBottom({ force: true })
this.scrollToBottom({ smooth: false, force: true })
} else {
this.$store.dispatch('setVisualLastReadMessageId', {
token: this.token,
Expand Down

0 comments on commit f57fb6b

Please sign in to comment.