summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/components/notifications.vue10
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>