diff options
| author | kPherox <admin@mail.kr-kp.com> | 2019-12-11 18:48:18 +0900 |
|---|---|---|
| committer | kPherox <admin@mail.kr-kp.com> | 2019-12-11 18:48:18 +0900 |
| commit | c3e7806acbd32483eab497a347f947158ab8febf (patch) | |
| tree | c9c3e83c3f01d5fcb4968b1c2a8ce66567639243 /src | |
| parent | b4acbf5311b5f8db21bc2e32a9e5246425edcec4 (diff) | |
remove unused fallback
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/notification/notification.js | 16 | ||||
| -rw-r--r-- | src/modules/users.js | 2 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 93edf2fa..e7bd769e 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -43,26 +43,14 @@ const Notification = { const user = this.notification.from_profile return highlightStyle(highlight[user.screen_name]) }, - userInStore () { - return this.$store.getters.findUser(this.notification.from_profile.id) - }, user () { - if (this.userInStore) { - return this.userInStore - } - return this.notification.from_profile + return this.$store.getters.findUser(this.notification.from_profile.id) }, 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 + return this.$store.getters.findUser(this.notification.target.id) }, targetUserProfileLink () { return this.generateUserProfileLink(this.targetUser) diff --git a/src/modules/users.js b/src/modules/users.js index 14b2d8b5..f209b23b 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -368,8 +368,10 @@ const users = { }, addNewNotifications (store, { notifications }) { const users = map(notifications, 'from_profile') + const targetUsers = map(notifications, 'target') const notificationIds = notifications.map(_ => _.id) store.commit('addNewUsers', users) + store.commit('addNewUsers', targetUsers) const notificationsObject = store.rootState.statuses.notifications.idStore const relevantNotifications = Object.entries(notificationsObject) |
