From fceebf73884d72fa5b9d57b7d09c2fa73eb61af7 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 8 Apr 2019 15:17:39 +0900 Subject: [PATCH 1/9] Fix #4562 (#4563) --- src/client/app/common/views/deck/deck.user-column.home.vue | 4 ++-- src/client/app/desktop/views/home/user/user.timeline.vue | 4 ++-- src/client/app/mobile/views/components/user-timeline.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client/app/common/views/deck/deck.user-column.home.vue b/src/client/app/common/views/deck/deck.user-column.home.vue index 7a11be536..ee24cad1c 100644 --- a/src/client/app/common/views/deck/deck.user-column.home.vue +++ b/src/client/app/common/views/deck/deck.user-column.home.vue @@ -85,7 +85,7 @@ export default Vue.extend({ this.makePromise = cursor => this.$root.api('users/notes', { userId: this.user.id, limit: fetchLimit + 1, - untilId: cursor ? cursor : undefined, + untilDate: cursor ? cursor : new Date().getTime() + 1000 * 86400 * 365, withFiles: this.withFiles, includeMyRenotes: this.$store.state.settings.showMyRenotes, includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes, @@ -95,7 +95,7 @@ export default Vue.extend({ notes.pop(); return { notes: notes, - cursor: notes[notes.length - 1].id + cursor: new Date(notes[notes.length - 1].createdAt).getTime() }; } else { return { diff --git a/src/client/app/desktop/views/home/user/user.timeline.vue b/src/client/app/desktop/views/home/user/user.timeline.vue index f5d14112d..4bdf4b6cd 100644 --- a/src/client/app/desktop/views/home/user/user.timeline.vue +++ b/src/client/app/desktop/views/home/user/user.timeline.vue @@ -36,13 +36,13 @@ export default Vue.extend({ includeReplies: this.mode == 'with-replies', includeMyRenotes: this.mode != 'my-posts', withFiles: this.mode == 'with-media', - untilId: cursor ? cursor : undefined + untilDate: cursor ? cursor : new Date().getTime() + 1000 * 86400 * 365 }).then(notes => { if (notes.length == fetchLimit + 1) { notes.pop(); return { notes: notes, - cursor: notes[notes.length - 1].id + cursor: new Date(notes[notes.length - 1].createdAt).getTime() }; } else { return { diff --git a/src/client/app/mobile/views/components/user-timeline.vue b/src/client/app/mobile/views/components/user-timeline.vue index 1b73b5bc4..3ba4011c6 100644 --- a/src/client/app/mobile/views/components/user-timeline.vue +++ b/src/client/app/mobile/views/components/user-timeline.vue @@ -21,13 +21,13 @@ export default Vue.extend({ userId: this.user.id, limit: fetchLimit + 1, withFiles: this.withMedia, - untilId: cursor ? cursor : undefined + untilDate: cursor ? cursor : new Date().getTime() + 1000 * 86400 * 365 }).then(notes => { if (notes.length == fetchLimit + 1) { notes.pop(); return { notes: notes, - cursor: notes[notes.length - 1].id + cursor: new Date(notes[notes.length - 1].createdAt).getTime() }; } else { return { From 82af9320c0ea946df50e659cd76d9500b9e4d998 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 8 Apr 2019 15:18:44 +0900 Subject: [PATCH 2/9] =?UTF-8?q?Fix:=20TL=E3=82=92=E9=81=A1=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E6=99=82=E3=81=AB=E6=8A=9C=E3=81=91=E3=81=8C=E3=81=82?= =?UTF-8?q?=E3=82=8B=E6=99=82=E3=81=8C=E3=81=82=E3=82=8B=20(v10)=20(#4629)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update the cursor when the timeline is updated * fix releaseQueue --- src/client/app/common/views/deck/deck.notes.vue | 2 ++ src/client/app/desktop/views/components/notes.vue | 2 ++ src/client/app/mobile/views/components/notes.vue | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/client/app/common/views/deck/deck.notes.vue b/src/client/app/common/views/deck/deck.notes.vue index f94eb8fd3..8787a82a1 100644 --- a/src/client/app/common/views/deck/deck.notes.vue +++ b/src/client/app/common/views/deck/deck.notes.vue @@ -157,6 +157,7 @@ export default Vue.extend({ // オーバーフローしたら古い投稿は捨てる if (this.notes.length >= displayLimit) { this.notes = this.notes.slice(0, displayLimit); + this.cursor = this.notes[this.notes.length - 1].id } } else { this.queue.push(note); @@ -165,6 +166,7 @@ export default Vue.extend({ append(note) { this.notes.push(note); + this.cursor = this.notes[this.notes.length - 1].id }, releaseQueue() { diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue index 4334e7845..e4df8a4b5 100644 --- a/src/client/app/desktop/views/components/notes.vue +++ b/src/client/app/desktop/views/components/notes.vue @@ -157,6 +157,7 @@ export default Vue.extend({ // オーバーフローしたら古い投稿は捨てる if (this.notes.length >= displayLimit) { this.notes = this.notes.slice(0, displayLimit); + this.cursor = this.notes[this.notes.length - 1].id } } else { this.queue.push(note); @@ -165,6 +166,7 @@ export default Vue.extend({ append(note) { this.notes.push(note); + this.cursor = this.notes[this.notes.length - 1].id }, releaseQueue() { diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue index 7aeebde64..16a1682c2 100644 --- a/src/client/app/mobile/views/components/notes.vue +++ b/src/client/app/mobile/views/components/notes.vue @@ -151,6 +151,7 @@ export default Vue.extend({ // オーバーフローしたら古い投稿は捨てる if (this.notes.length >= displayLimit) { this.notes = this.notes.slice(0, displayLimit); + this.cursor = this.notes[this.notes.length - 1].id } } else { this.queue.push(note); @@ -159,6 +160,7 @@ export default Vue.extend({ append(note) { this.notes.push(note); + this.cursor = this.notes[this.notes.length - 1].id }, releaseQueue() { From f2ad1a04069119e7b66757c470c1720581b48eab Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 8 Apr 2019 20:16:00 +0900 Subject: [PATCH 3/9] =?UTF-8?q?Fix:=20=E6=8A=95=E7=A8=BF=E3=82=A6=E3=82=A3?= =?UTF-8?q?=E3=82=B8=E3=83=83=E3=83=88=E3=81=A7=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E3=81=BF=E3=81=AE=E5=85=AC=E9=96=8B=E7=AF=84?= =?UTF-8?q?=E5=9B=B2=E3=81=A7=E6=8A=95=E7=A8=BF=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=20(#4653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/views/widgets/post-form.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/views/widgets/post-form.vue b/src/client/app/common/views/widgets/post-form.vue index 5a456d810..f1826cc59 100644 --- a/src/client/app/common/views/widgets/post-form.vue +++ b/src/client/app/common/views/widgets/post-form.vue @@ -176,10 +176,22 @@ export default define({ post() { this.posting = true; + let visibility = 'public'; + let localOnly = false; + + const m = this.$store.state.settings.defaultNoteVisibility.match(/^local-(.+)/); + if (m) { + visibility = m[1]; + localOnly = true; + } else { + visibility = this.$store.state.settings.defaultNoteVisibility; + } + this.$root.api('notes/create', { text: this.text == '' ? undefined : this.text, fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined, - visibility: this.$store.state.settings.defaultNoteVisibility + visibility, + localOnly, }).then(data => { this.clear(); }).catch(err => { From 592cdfa910cd3fa009337baa5debf27f3152f447 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 8 Apr 2019 20:18:42 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=81=A7=E3=83=95=E3=82=A9=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(#4654)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/views/components/user-list.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/views/components/user-list.vue b/src/client/app/common/views/components/user-list.vue index 4661e4894..b56cb13c3 100644 --- a/src/client/app/common/views/components/user-list.vue +++ b/src/client/app/common/views/components/user-list.vue @@ -8,7 +8,7 @@

{{ $t('no-users') }}

-
+
@@ -18,6 +18,7 @@
+