From 9beddc941a716f1322ae0b7d71d159edd642a399 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 20 Feb 2019 16:35:00 +0900 Subject: 返信が遷移後も残り続ける問題を修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/mobile/views/components/note-detail.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/client') diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue index e00ecd5ffa..c4403dbd62 100644 --- a/src/client/app/mobile/views/components/note-detail.vue +++ b/src/client/app/mobile/views/components/note-detail.vue @@ -122,19 +122,23 @@ export default Vue.extend({ }; }, - mounted() { - // Get replies - if (!this.compact) { + watch: { + note() { + this.fetchReplies(); + } + }, + + methods: { + fetchReplies() { + if (this.compact) return; this.$root.api('notes/replies', { noteId: this.appearNote.id, limit: 8 }).then(replies => { this.replies = replies; }); - } - }, + }, - methods: { fetchConversation() { this.conversationFetching = true; -- cgit v1.2.3-freya