From 31aa177eea8f2e50e1802d1dd51a8470199b6bcb Mon Sep 17 00:00:00 2001 From: kPherox Date: Wed, 11 Dec 2019 04:02:25 +0900 Subject: [PATCH] Fix target account link --- src/components/notification/notification.js | 12 ++++++++++++ src/components/notification/notification.vue | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 7d46eb5a..93edf2fa 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -55,6 +55,18 @@ const Notification = { userProfileLink () { return this.generateUserProfileLink(this.user) }, + targetUserInStore () { + return this.$store.getters.findUser(this.notification.target.id) + }, + targetUser () { + if (this.targetUserInStore) { + return this.targetUserInStore + } + return this.notification.target + }, + targetUserProfileLink () { + return this.generateUserProfileLink(this.targetUser) + }, needMute () { return this.user.muted } diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index cf4d8072..33ae054f 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -123,7 +123,7 @@ v-else-if="notification.type === 'move'" class="move-text" > - + @{{ notification.target.screen_name }}