remove unused fallback
This commit is contained in:
parent
b4acbf5311
commit
c3e7806acb
|
@ -43,26 +43,14 @@ const Notification = {
|
||||||
const user = this.notification.from_profile
|
const user = this.notification.from_profile
|
||||||
return highlightStyle(highlight[user.screen_name])
|
return highlightStyle(highlight[user.screen_name])
|
||||||
},
|
},
|
||||||
userInStore () {
|
|
||||||
return this.$store.getters.findUser(this.notification.from_profile.id)
|
|
||||||
},
|
|
||||||
user () {
|
user () {
|
||||||
if (this.userInStore) {
|
return this.$store.getters.findUser(this.notification.from_profile.id)
|
||||||
return this.userInStore
|
|
||||||
}
|
|
||||||
return this.notification.from_profile
|
|
||||||
},
|
},
|
||||||
userProfileLink () {
|
userProfileLink () {
|
||||||
return this.generateUserProfileLink(this.user)
|
return this.generateUserProfileLink(this.user)
|
||||||
},
|
},
|
||||||
targetUserInStore () {
|
|
||||||
return this.$store.getters.findUser(this.notification.target.id)
|
|
||||||
},
|
|
||||||
targetUser () {
|
targetUser () {
|
||||||
if (this.targetUserInStore) {
|
return this.$store.getters.findUser(this.notification.target.id)
|
||||||
return this.targetUserInStore
|
|
||||||
}
|
|
||||||
return this.notification.target
|
|
||||||
},
|
},
|
||||||
targetUserProfileLink () {
|
targetUserProfileLink () {
|
||||||
return this.generateUserProfileLink(this.targetUser)
|
return this.generateUserProfileLink(this.targetUser)
|
||||||
|
|
|
@ -368,8 +368,10 @@ const users = {
|
||||||
},
|
},
|
||||||
addNewNotifications (store, { notifications }) {
|
addNewNotifications (store, { notifications }) {
|
||||||
const users = map(notifications, 'from_profile')
|
const users = map(notifications, 'from_profile')
|
||||||
|
const targetUsers = map(notifications, 'target')
|
||||||
const notificationIds = notifications.map(_ => _.id)
|
const notificationIds = notifications.map(_ => _.id)
|
||||||
store.commit('addNewUsers', users)
|
store.commit('addNewUsers', users)
|
||||||
|
store.commit('addNewUsers', targetUsers)
|
||||||
|
|
||||||
const notificationsObject = store.rootState.statuses.notifications.idStore
|
const notificationsObject = store.rootState.statuses.notifications.idStore
|
||||||
const relevantNotifications = Object.entries(notificationsObject)
|
const relevantNotifications = Object.entries(notificationsObject)
|
||||||
|
|
Loading…
Reference in New Issue