From 2701a7e85fcf745e75b46b88b0fc9b3f76218e44 Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Wed, 29 Jul 2020 23:03:08 +0900 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E9=80=9A=E7=9F=A5=E3=81=AE?= =?UTF-8?q?=E3=83=8E=E3=83=BC=E3=83=88=E3=81=8C=E3=83=AA=E3=82=A2=E3=82=AF?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=83=96=E3=81=A7=E3=81=AF=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #6602 --- src/client/components/notifications.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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> -- GitLab