From 8923dce494a3aab5695afde7cd4b0e9aa72e2c98 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Fri, 10 Jan 2020 00:15:14 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=A9=E3=82=A4=E3=83=88?= =?UTF-8?q?=E3=81=A7read=20more=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/scripts/paging.ts | 16 ++++++++++------ src/client/app/common/views/pages/featured.vue | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/client/app/common/scripts/paging.ts b/src/client/app/common/scripts/paging.ts index b4f2ec1ae..a0cd2891d 100644 --- a/src/client/app/common/scripts/paging.ts +++ b/src/client/app/common/scripts/paging.ts @@ -82,14 +82,18 @@ export default (opts) => ({ limit: (this.pagination.limit || 10) + 1, ...params }).then(x => { - if (x.length == (this.pagination.limit || 10) + 1) { - x.pop(); - this.items = x; - this.more = true; - } else { - this.items = x; + if (this.pagination.forceDisableReadmore) { this.more = false; + } else { + if (x.length == (this.pagination.limit || 10) + 1) { + x.pop(); + this.more = true; + } else { + this.more = false; + } } + + this.items = x; this.offset = x.length; this.inited = true; this.fetching = false; diff --git a/src/client/app/common/views/pages/featured.vue b/src/client/app/common/views/pages/featured.vue index c00361aa8..03c6a6a05 100644 --- a/src/client/app/common/views/pages/featured.vue +++ b/src/client/app/common/views/pages/featured.vue @@ -25,6 +25,7 @@ export default Vue.extend({ pagination: { endpoint: 'notes/featured', limit: 29, + forceDisableReadmore: true, }, notesComponent: