From ed0fdaddbd030e208fe0fbdf20700bf7be0ffbc7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 20 Feb 2019 22:21:12 +0900 Subject: [PATCH] Fix #4333 --- CHANGELOG.md | 4 +++ .../app/desktop/views/deck/deck.notes.vue | 7 +++-- .../views/deck/deck.user-column.home.vue | 29 +++++++++++++------ 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edcafa6079..6c7c9d508a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ ChangeLog ========= +unreleased +---------- +* デッキでユーザーを表示したときにタイムラインが残存する問題を修正 + 10.87.5 ---------- * モバイル版でも連携サービスを表示するように diff --git a/src/client/app/desktop/views/deck/deck.notes.vue b/src/client/app/desktop/views/deck/deck.notes.vue index e7fa9fd52a..5868985647 100644 --- a/src/client/app/desktop/views/deck/deck.notes.vue +++ b/src/client/app/desktop/views/deck/deck.notes.vue @@ -91,6 +91,9 @@ export default Vue.extend({ watch: { queue(q) { this.count(q.length); + }, + makePromise() { + this.init(); } }, @@ -115,12 +118,12 @@ export default Vue.extend({ }, reload() { - this.queue = []; - this.notes = []; this.init(); }, init() { + this.queue = []; + this.notes = []; this.fetching = true; this.makePromise().then(x => { if (Array.isArray(x)) { diff --git a/src/client/app/desktop/views/deck/deck.user-column.home.vue b/src/client/app/desktop/views/deck/deck.user-column.home.vue index 90fd2f5a09..06604a29bc 100644 --- a/src/client/app/desktop/views/deck/deck.user-column.home.vue +++ b/src/client/app/desktop/views/deck/deck.user-column.home.vue @@ -61,7 +61,24 @@ export default Vue.extend({ return { withFiles: false, images: [], - makePromise: cursor => this.$root.api('users/notes', { + makePromise: null + }; + }, + + watch: { + user() { + this.genPromiseMaker(); + } + }, + + created() { + this.fetch(); + this.genPromiseMaker(); + }, + + methods: { + genPromiseMaker() { + this.makePromise = cursor => this.$root.api('users/notes', { userId: this.user.id, limit: fetchLimit + 1, untilId: cursor ? cursor : undefined, @@ -82,15 +99,9 @@ export default Vue.extend({ cursor: null }; } - }) - }; - }, + }); + }, - created() { - this.fetch(); - }, - - methods: { fetch() { const image = [ 'image/jpeg',