diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-07-15 19:09:01 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-07-15 19:09:01 +0000 |
| commit | 3370dd80dc4644f2bff053b97b18698cd2abb550 (patch) | |
| tree | 0f4ad9f266eafada88cf6314a276f30257a1f116 /src/components/status/status.js | |
| parent | 7ed9d17ce745abc38a27d4994452a136357aba46 (diff) | |
| parent | e9b452575b9a5ef87808898086771ae806fc3a8b (diff) | |
Merge branch 'develop' into 'feat/conversation-muting'
# Conflicts:
# src/services/api/api.service.js
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 199351cb..7911d40d 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -173,12 +173,13 @@ const Status = { if (this.status.type === 'retweet') { return false } - var checkFollowing = this.$store.state.config.replyVisibility === 'following' + const checkFollowing = this.$store.state.config.replyVisibility === 'following' for (var i = 0; i < this.status.attentions.length; ++i) { if (this.status.user.id === this.status.attentions[i].id) { continue } - if (checkFollowing && this.$store.getters.findUser(this.status.attentions[i].id).following) { + const taggedUser = this.$store.getters.findUser(this.status.attentions[i].id) + if (checkFollowing && taggedUser && taggedUser.following) { return false } if (this.status.attentions[i].id === this.$store.state.users.currentUser.id) { @@ -418,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: { |
