From 9565c52e2399726bea94bffa962d456d405bf23e Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 13 Oct 2019 21:19:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ChatRenderer/index.vue | 7 +++++-- update.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/ChatRenderer/index.vue b/frontend/src/components/ChatRenderer/index.vue index d6cd2360..e74e7804 100644 --- a/frontend/src/components/ChatRenderer/index.vue +++ b/frontend/src/components/ChatRenderer/index.vue @@ -37,6 +37,9 @@ import LegacyPaidMessage from './LegacyPaidMessage.vue' import PaidMessage from './PaidMessage.vue' import * as constants from './constants' +// const CHAT_SMOOTH_ANIMATION_TIME_MS = 84 +const SCROLLED_TO_BOTTOM_EPSILON = 15 + export default { name: 'ChatRenderer', components: { @@ -83,8 +86,8 @@ export default { this.$refs.scroller.scrollTop = this.$refs.scroller.scrollHeight }, onScroll() { - this.canAutoScroll = Math.abs(this.$refs.scroller.scrollHeight - this.$refs.scroller.scrollTop - - this.$refs.scroller.clientHeight) < 2 + let scroller = this.$refs.scroller + this.canAutoScroll = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight < SCROLLED_TO_BOTTOM_EPSILON } } } diff --git a/update.py b/update.py index 895b7ab8..e0fe4175 100644 --- a/update.py +++ b/update.py @@ -2,7 +2,7 @@ import aiohttp -VERSION = 'v1.2.1' +VERSION = 'v1.2.2' async def check_update():