diff --git a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js index c85e019ce..9d8be663a 100644 --- a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js +++ b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js @@ -180,6 +180,7 @@ export default Vue.extend({ } this.comments.push(comment) + console.log(this.comments.length) if (typeof (comment.superchat) !== 'undefined') { this.$store.dispatch('getRandomColorClass').then((data) => { @@ -211,6 +212,10 @@ export default Vue.extend({ if (this.stayAtBottom) { liveChatComments.animate({ scrollTop: liveChatComments.prop('scrollHeight') }) } + + if (this.comments.length > 150) { + this.comments = this.comments.splice(this.comments.length - 150, this.comments.length) + } }, removeFromSuperChat: function (id) {