Remove expensive and unnecessary button check on channel switch

This commit is contained in:
Pavel Djundik 2018-07-12 13:40:26 +03:00 committed by Pavel Djundik
parent ae692b1f2f
commit a138237155

View File

@ -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;