mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-13 13:09:46 +01:00
Remove live chat comments after 150 comments to better scroll through chat.
This commit is contained in:
parent
407449ac65
commit
ce3bde6712
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user