Fix duplicate comments from being displayed

This commit is contained in:
Preston 2020-09-22 18:02:20 -04:00
parent 37685de856
commit ddfe9b745c
3 changed files with 13 additions and 2 deletions

View File

@ -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',

View File

@ -114,7 +114,7 @@
<h4
v-if="commentData.length > 0 && !isLoading && showComments"
class="getMoreComments"
@click="getCommentData"
@click="getMoreComments"
>
{{ $t("Comments.Load More Comments") }}
</h4>

View File

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