From ddfe9b745c46aafe71fe2da9be65fbf4abec187e Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 22 Sep 2020 18:02:20 -0400 Subject: [PATCH] Fix duplicate comments from being displayed --- .../watch-video-comments/watch-video-comments.js | 12 +++++++++++- .../watch-video-comments/watch-video-comments.vue | 2 +- static/locales/en-US.yaml | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index 819d964fc..eda2f0081 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -50,6 +50,16 @@ export default Vue.extend({ } }, + getMoreComments: function () { + if (this.commentData.length === 0 || this.nextPageToken === null || typeof this.nextPageToken === 'undefined') { + this.showToast({ + message: this.$t('Comments.There are no more comments for this video') + }) + } else { + this.getCommentData() + } + }, + getCommentReplies: function (index) { switch (this.commentData[index].dataType) { case 'local': @@ -173,7 +183,7 @@ export default Vue.extend({ getCommentRepliesInvidious: function (index) { this.showToast({ - message: this.$t('Getting comment replies, please wait') + message: this.$t('Comments.Getting comment replies, please wait') }) const payload = { resource: 'comments', diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index 9c155c15d..ece71b3b7 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -114,7 +114,7 @@

{{ $t("Comments.Load More Comments") }}

diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index b520ef17c..afc591efa 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -473,6 +473,7 @@ Comments: Comments: Comments Click to View Comments: Click to View Comments Getting comment replies, please wait: Getting comment replies, please wait + There are no more comments for this video: There are no more comments for this video Show Comments: Show Comments Hide Comments: Hide Comments # Context: View 10 Replies, View 1 Reply