diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-07-09 13:46:06 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-07-09 13:46:06 +0000 |
| commit | 2f87540612e5e46b6cd0fb343d8f9bfdb0dad333 (patch) | |
| tree | 9d6aa70693530cdd0276082b911e40d21a5b77fc /src/components/status/status.js | |
| parent | 6b4fe1c2d9143578ccc8a6ae5774006b34002ba2 (diff) | |
| parent | 0131effb013025edae843ed7c92ef8fdf43a3623 (diff) | |
Merge branch '588' into 'develop'
Sync the counters in Favs and Repeats view and near the buttons
Closes #588
See merge request pleroma/pleroma-fe!854
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 4b3499cd..7911d40d 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -419,6 +419,18 @@ const Status = { window.scrollBy(0, rect.bottom - window.innerHeight + 50) } } + }, + 'status.repeat_num': function (num) { + // refetch repeats when repeat_num is changed in any way + if (this.isFocused && this.statusFromGlobalRepository.rebloggedBy && this.statusFromGlobalRepository.rebloggedBy.length !== num) { + this.$store.dispatch('fetchRepeats', this.status.id) + } + }, + 'status.fave_num': function (num) { + // refetch favs when fave_num is changed in any way + if (this.isFocused && this.statusFromGlobalRepository.favoritedBy && this.statusFromGlobalRepository.favoritedBy.length !== num) { + this.$store.dispatch('fetchFavs', this.status.id) + } } }, filters: { |
