diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-03-02 08:06:03 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-03-02 08:06:03 +0900 |
| commit | 1d02d9e0feab04b48950207123f11f1decbec473 (patch) | |
| tree | 3b50e0ebcf68161f009f199b1f0b50db30b02f5f /src | |
| parent | Refactor (diff) | |
| download | misskey-1d02d9e0feab04b48950207123f11f1decbec473.tar.gz misskey-1d02d9e0feab04b48950207123f11f1decbec473.tar.bz2 misskey-1d02d9e0feab04b48950207123f11f1decbec473.zip | |
モバイルのデッキで返信が表示されない問題を修正
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/common/views/deck/deck.note-column.vue | 4 | ||||
| -rw-r--r-- | src/client/app/desktop/views/components/note.vue | 8 | ||||
| -rw-r--r-- | src/client/app/mobile/views/components/note.vue | 31 |
3 files changed, 34 insertions, 9 deletions
diff --git a/src/client/app/common/views/deck/deck.note-column.vue b/src/client/app/common/views/deck/deck.note-column.vue index ca798707bb..ddc3860d3d 100644 --- a/src/client/app/common/views/deck/deck.note-column.vue +++ b/src/client/app/common/views/deck/deck.note-column.vue @@ -11,7 +11,7 @@ <a :href="note.url || note.uri" target="_blank">{{ $t('@.view-on-remote') }}</a> </details> </div> - <mk-note :note="note" :detail="true"/> + <mk-note :note="note" :detail="true" :key="note.id"/> </div> </x-column> </template> @@ -20,13 +20,11 @@ import Vue from 'vue'; import i18n from '../../../i18n'; import XColumn from './deck.column.vue'; -import XNotes from './deck.notes.vue'; export default Vue.extend({ i18n: i18n(), components: { XColumn, - XNotes, }, data() { diff --git a/src/client/app/desktop/views/components/note.vue b/src/client/app/desktop/views/components/note.vue index 90454dbad9..9dc831db73 100644 --- a/src/client/app/desktop/views/components/note.vue +++ b/src/client/app/desktop/views/components/note.vue @@ -7,9 +7,7 @@ v-hotkey="keymap" :title="title" > - <div class="conversation" v-if="detail && conversation.length > 0"> - <x-sub v-for="note in conversation" :key="note.id" :note="note"/> - </div> + <x-sub v-for="note in conversation" :key="note.id" :note="note"/> <div class="reply-to" v-if="appearNote.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)"> <x-sub :note="appearNote.reply"/> </div> @@ -69,9 +67,7 @@ <div class="deleted" v-if="appearNote.deletedAt != null">{{ $t('deleted') }}</div> </div> </article> - <div class="replies" v-if="detail && replies.length > 0"> - <x-sub v-for="note in replies" :key="note.id" :note="note"/> - </div> + <x-sub v-for="note in replies" :key="note.id" :note="note"/> </div> </template> diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue index 1d056c126d..de556f170c 100644 --- a/src/client/app/mobile/views/components/note.vue +++ b/src/client/app/mobile/views/components/note.vue @@ -6,6 +6,7 @@ :class="{ renote: isRenote, smart: $store.state.device.postStyle == 'smart', mini: narrow }" v-hotkey="keymap" > + <x-sub v-for="note in conversation" :key="note.id" :note="note"/> <div class="reply-to" v-if="appearNote.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)"> <x-sub :note="appearNote.reply"/> </div> @@ -62,6 +63,7 @@ <div class="deleted" v-if="appearNote.deletedAt != null">{{ $t('deleted') }}</div> </div> </article> + <x-sub v-for="note in replies" :key="note.id" :note="note"/> </div> </template> @@ -91,6 +93,11 @@ export default Vue.extend({ type: Object, required: true }, + detail: { + type: Boolean, + required: false, + default: false + }, }, inject: { @@ -98,6 +105,30 @@ export default Vue.extend({ default: false } }, + + data() { + return { + conversation: [], + replies: [] + }; + }, + + created() { + if (this.detail) { + this.$root.api('notes/replies', { + noteId: this.appearNote.id, + limit: 8 + }).then(replies => { + this.replies = replies; + }); + + this.$root.api('notes/conversation', { + noteId: this.appearNote.replyId + }).then(conversation => { + this.conversation = conversation.reverse(); + }); + } + } }); </script> |