From a13823715512bb2755c69b8f25717e9c67e70def Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 12 Jul 2018 13:40:26 +0300 Subject: [PATCH] Remove expensive and unnecessary button check on channel switch --- client/components/Chat.vue | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/client/components/Chat.vue b/client/components/Chat.vue index 96bfc647..daae13bf 100644 --- a/client/components/Chat.vue +++ b/client/components/Chat.vue @@ -118,17 +118,6 @@ export default { }, }, watch: { - "channel.id"() { - if (this.channel.moreHistoryAvailable && this.$refs.loadMoreButton) { - this.$nextTick(() => { - const bounding = this.$refs.loadMoreButton.getBoundingClientRect(); - - if (bounding.width > 0 && bounding.top >= 0) { - this.$refs.loadMoreButton.click(); - } - }); - } - }, "channel.messages"() { const el = this.$refs.chat;