Skip to content
Snippets Groups Projects
Commit 2701a7e8 authored by syuilo's avatar syuilo
Browse files

fix(client): 通知のノートがリアクティブではない問題を修正

Fix #6602
parent 31a0afda
No related branches found
No related tags found
No related merge requests found
<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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment