Skip to content

Commit e2ee3f8

Browse files
author
topboy
committed
scroll to bottom fix
1 parent f626c67 commit e2ee3f8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/components/App.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,12 @@ export default {
379379
this.$state.ui.app_is_visible = newState;
380380
},
381381
scrollToBottom() {
382-
if (this.$state?.ml?.scrollToBottom instanceof Function) {
383-
this.$state.$emit('messagelist.scrollto-bottom');
384-
setTimeout(() => {
385-
if (this.$refs.scrollToBottom) {
386-
this.$refs.scrollToBottom.classList.remove('active');
387-
}
388-
}, 50);
389-
}
382+
this.$state.$emit('messagelist.scrollto-bottom');
383+
setTimeout(() => {
384+
if (this.$refs.scrollToBottom) {
385+
this.$refs.scrollToBottom.classList.remove('active');
386+
}
387+
}, 50);
390388
},
391389
onKeyDown(event) {
392390
this.$state.$emit('document.keydown', event);

src/components/MessageList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export default {
313313
}
314314
});
315315
this.listen(this.$state, 'messagelist.scrollto-bottom', () => {
316-
this.maybeScrollToBottom();
316+
this.scrollToBottom();
317317
});
318318
this.$state.$on('messageinfo.close', () => {
319319
this.message_info_open = null;

0 commit comments

Comments
 (0)