aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.js
diff options
context:
space:
mode:
authorBrenden Bice <brenden.next@gmail.com>2019-04-09 11:45:33 -0400
committerBrenden Bice <brenden.next@gmail.com>2019-04-11 23:26:13 -0400
commit8ed4eb8a7ffe0e370cfc06017d2bce34b2c9d987 (patch)
tree0142857ce6518bf132347c6ce56d7a0436e778dd /src/components/status/status.js
parentf74a6b4b5777211dcda979b0e390305f46efdd95 (diff)
refactor showing favs and repeats logic
Diffstat (limited to 'src/components/status/status.js')
-rw-r--r--src/components/status/status.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 44caf3af..db234ec1 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -98,6 +98,10 @@ const Status = {
return this.statusoid
}
},
+ statusFromGlobalRepository () {
+ // NOTE: Consider to replace status with statusFromGlobalRepository
+ return this.$store.state.statuses.allStatusesObject[this.status.id]
+ },
loggedIn () {
return !!this.$store.state.users.currentUser
},
@@ -260,7 +264,8 @@ const Status = {
return this.status.summary_html + '<br />' + this.status.statusnet_html
},
combinedFavsAndRepeatsAvatars () {
- const combinedAvatars = [].concat(this.statusoid.favoritedBy, this.statusoid.rebloggedBy).filter(_ => _)
+ // Use the status from the global status repository since favs and repeats are saved in it
+ const combinedAvatars = [].concat(this.statusFromGlobalRepository.favoritedBy, this.statusFromGlobalRepository.rebloggedBy).filter(_ => _)
return uniqBy(combinedAvatars, 'id')
}
},