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: 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(-) (limited to 'src') 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 7a11be536b..ee24cad1c5 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 f5d14112db..4bdf4b6cdc 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 1b73b5bc41..3ba4011c6c 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 { -- cgit v1.2.3-freya 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: Fix: TLを遡った時に抜けがある時がある (v10) (#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(+) (limited to 'src') diff --git a/src/client/app/common/views/deck/deck.notes.vue b/src/client/app/common/views/deck/deck.notes.vue index f94eb8fd38..8787a82a1c 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 4334e78451..e4df8a4b55 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 7aeebde643..16a1682c2a 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() { -- cgit v1.2.3-freya 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: Fix: 投稿ウィジットでローカルのみの公開範囲で投稿できない (#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(-) (limited to 'src') diff --git a/src/client/app/common/views/widgets/post-form.vue b/src/client/app/common/views/widgets/post-form.vue index 5a456d8108..f1826cc59f 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 => { -- cgit v1.2.3-freya 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: ユーザーリストでフォローボタンを表示するように (#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(-) (limited to 'src') diff --git a/src/client/app/common/views/components/user-list.vue b/src/client/app/common/views/components/user-list.vue index 4661e48947..b56cb13c3e 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') }}