diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-07-29 23:03:08 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-07-29 23:03:08 +0900 |
| commit | 2701a7e85fcf745e75b46b88b0fc9b3f76218e44 (patch) | |
| tree | 5764936768699cbf9e5d65ffc47c28a8bd6120c5 /src | |
| parent | fix(client): ピン留めされたノートがリアクティブではない... (diff) | |
| download | sharkey-2701a7e85fcf745e75b46b88b0fc9b3f76218e44.tar.gz sharkey-2701a7e85fcf745e75b46b88b0fc9b3f76218e44.tar.bz2 sharkey-2701a7e85fcf745e75b46b88b0fc9b3f76218e44.zip | |
fix(client): 通知のノートがリアクティブではない問題を修正
Fix #6602
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/components/notifications.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index dff4bd35da..1271b89475 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -1,7 +1,7 @@ <template> <div class="mfcuwfyp"> <x-list class="notifications" :items="items" v-slot="{ item: notification }"> - <x-note v-if="['reply', 'quote', 'mention'].includes(notification.type)" :note="notification.note" :key="notification.id"/> + <x-note v-if="['reply', 'quote', 'mention'].includes(notification.type)" :note="notification.note" @updated="noteUpdated(notification.note, $event)" :key="notification.id"/> <x-notification v-else :notification="notification" :with-time="true" :full="true" class="_panel notification" :key="notification.id"/> </x-list> @@ -82,6 +82,14 @@ export default Vue.extend({ isRead: document.visibilityState === 'visible' }); }, + + noteUpdated(oldValue, newValue) { + const i = this.items.findIndex(n => n.note === oldValue); + Vue.set(this.items, i, { + ...this.items[i], + note: newValue + }); + }, } }); </script> |