aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/status/status.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 4b3499cd..6f83dbe0 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -402,6 +402,9 @@ const Status = {
setMedia () {
const attachments = this.attachmentSize === 'hide' ? this.status.attachments : this.galleryAttachments
return () => this.$store.dispatch('setMedia', attachments)
+ },
+ refetchFavsAndRepeats () {
+ this.$store.dispatch('fetchFavsAndRepeats', this.status.id)
}
},
watch: {
@@ -419,6 +422,16 @@ const Status = {
window.scrollBy(0, rect.bottom - window.innerHeight + 50)
}
}
+ },
+ 'status.repeat_num': function (num) {
+ if (this.isFocused && this.statusFromGlobalRepository.rebloggedBy && this.statusFromGlobalRepository.rebloggedBy.length !== num) {
+ this.refetchFavsAndRepeats()
+ }
+ },
+ 'status.fave_num': function (num) {
+ if (this.isFocused && this.statusFromGlobalRepository.favoritedBy && this.statusFromGlobalRepository.favoritedBy.length !== num) {
+ this.refetchFavsAndRepeats()
+ }
}
},
filters: {