Merge pull request #7 from ElectricS01/main

Removed unused code
This commit is contained in:
Troplo 2023-02-11 17:42:32 +11:00 committed by GitHub
commit 994b67b16a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1050,21 +1050,13 @@ export default {
this.edit.id = ""
this.focusInput()
},
autoScroll(smooth = false) {
autoScroll() {
this.$nextTick(() => {
if (!this.avoidAutoScroll) {
try {
const lastIndex = this.messages.length - 1
const lastMessage = document.querySelector(`#message-${lastIndex}`)
if (smooth) {
lastMessage.scrollIntoView({
behavior: "smooth",
block: "nearest",
inline: "start"
})
} else {
lastMessage.scrollIntoView()
}
this.autoScrollRetry = 0
} catch (e) {
console.log("Could not auto scroll, retrying...")