diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-07-26 12:44:32 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-07-26 12:44:32 +0000 |
| commit | d3f6b581d1bbe64d26fceae3f00e9d471ca44dfe (patch) | |
| tree | 371e786ac95c83d914aa04f22aa9aabfb7b5dc4a /src/components/status/status.js | |
| parent | 3370dd80dc4644f2bff053b97b18698cd2abb550 (diff) | |
| parent | 4827e4d972f8ee11e606693e24ae4ca21711c6b1 (diff) | |
Merge branch 'develop' into 'feat/conversation-muting'
# Conflicts:
# src/components/extra_buttons/extra_buttons.js
# src/components/extra_buttons/extra_buttons.vue
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 7911d40d..3c172e5b 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -110,8 +110,9 @@ const Status = { }, muteWordHits () { const statusText = this.status.text.toLowerCase() + const statusSummary = this.status.summary.toLowerCase() const hits = filter(this.muteWords, (muteWord) => { - return statusText.includes(muteWord.toLowerCase()) + return statusText.includes(muteWord.toLowerCase()) || statusSummary.includes(muteWord.toLowerCase()) }) return hits @@ -280,6 +281,11 @@ const Status = { }, tags () { return this.status.tags.filter(tagObj => tagObj.hasOwnProperty('name')).map(tagObj => tagObj.name).join(' ') + }, + hidePostStats () { + return typeof this.$store.state.config.hidePostStats === 'undefined' + ? this.$store.state.instance.hidePostStats + : this.$store.state.config.hidePostStats } }, components: { @@ -316,11 +322,8 @@ const Status = { this.error = undefined }, linkClicked (event) { - let { target } = event - if (target.tagName === 'SPAN') { - target = target.parentNode - } - if (target.tagName === 'A') { + const target = event.target.closest('.status-content a') + if (target) { if (target.className.match(/mention/)) { const href = target.href const attn = this.status.attentions.find(attn => mentionMatchesUrl(attn, href)) |
