Change computed to filtered in toot

This commit is contained in:
AkiraFukushima 2019-01-24 00:06:13 +09:00
parent c6dda41188
commit e57d01b17a
1 changed files with 5 additions and 5 deletions

View File

@ -9,10 +9,10 @@
role="article" role="article"
aria-label="toot" aria-label="toot"
> >
<div v-show="filtered()" class="filtered"> <div v-show="filtered" class="filtered">
Filtered Filtered
</div> </div>
<div v-show="!filtered()" class="toot"> <div v-show="!filtered" class="toot">
<div class="icon" role="presentation"> <div class="icon" role="presentation">
<FailoverImg <FailoverImg
:src="originalMessage.account.avatar" :src="originalMessage.account.avatar"
@ -243,6 +243,9 @@ export default {
}, },
isShowAttachments: function () { isShowAttachments: function () {
return !this.sensitive || this.showAttachments return !this.sensitive || this.showAttachments
},
filtered: function () {
return this.filter.length > 0 && this.originalMessage.content.search(this.filter) >= 0
} }
}, },
mounted () { mounted () {
@ -445,9 +448,6 @@ export default {
}) })
}) })
}, },
filtered () {
return this.filter.length > 0 && this.originalMessage.content.search(this.filter) >= 0
},
locked (message) { locked (message) {
return message.visibility === 'private' return message.visibility === 'private'
}, },