From 4a2f676f2e7fe40727b0aac573b8c0f9b88eb0fe Mon Sep 17 00:00:00 2001 From: jasper Date: Mon, 1 Apr 2019 07:26:13 -0700 Subject: [PATCH] Fix user card in notification --- src/components/notification/notification.js | 11 ++++++++++- src/components/notification/notification.vue | 4 ++-- src/components/user_profile/user_profile.js | 3 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index fe5b7018..1289616c 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -31,7 +31,16 @@ const Notification = { const highlight = this.$store.state.config.highlight const user = this.notification.action.user return highlightStyle(highlight[user.screen_name]) - } + }, + userInStore () { + return this.$store.getters.findUser(this.notification.action.user.id) + }, + user () { + if (this.userInStore) { + return this.userInStore + } + return {} + }, } } diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 5e9cef97..8f532747 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -1,11 +1,11 @@