From 660a78c6e251b0f3ded7537ed067f201c55a5b23 Mon Sep 17 00:00:00 2001 From: kei-kmj <82737807+kei-kmj@users.noreply.github.com> Date: Fri, 12 Aug 2022 17:35:51 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82=E3=81=AB?= =?UTF-8?q?=E3=81=82=E3=81=A3=E3=81=9F=E9=96=A2=E6=95=B0=E3=82=921?= =?UTF-8?q?=E3=81=A4=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/comments.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/javascript/comments.vue b/app/javascript/comments.vue index 8a92a969f9c..9cd46372b1f 100644 --- a/app/javascript/comments.vue +++ b/app/javascript/comments.vue @@ -152,14 +152,12 @@ export default { changeActiveTab(tab) { this.tab = tab }, - calcCommentIncrement: function () { + displayMoreComments() { this.loadedComment = this.commentLimit + this.commentOffset >= this.commentTotalCount if (!this.loadedComment) { this.commentOffset += this.commentLimit } - }, - showNextCommentsAmount: function () { const commentRemaining = this.commentTotalCount - this.commentOffset if (commentRemaining > this.incrementCommentSize) { @@ -190,6 +188,7 @@ export default { this.comments.unshift(c) }) this.commentTotalCount = json.comment_total_count + this.displayMoreComments() }) .catch((error) => { console.warn(error) @@ -202,8 +201,6 @@ export default { this.setDefaultTextareaSize() }) } - this.calcCommentIncrement() - this.showNextCommentsAmount() }) }, createComment() {