Change computed to favouritesCount in toot

This commit is contained in:
AkiraFukushima 2019-01-23 23:41:06 +09:00
parent 6facd3ccfa
commit 58db5c1b25
1 changed files with 7 additions and 7 deletions

View File

@ -92,7 +92,7 @@
<icon name="star" scale="0.9"></icon>
</el-button>
<span class="count">
{{ favouritesCount() }}
{{ favouritesCount }}
</span>
<el-button class="pinned" type="text" :title="$t('cards.toot.pinned')" :aria-label="$t('cards.toot.pinned')" v-show="pinned">
<icon name="thumbtack" scale="0.9"></icon>
@ -214,6 +214,12 @@ export default {
return this.originalMessage.reblogs_count
}
return ''
},
favouritesCount: function () {
if (this.originalMessage.favourites_count > 0) {
return this.originalMessage.favourites_count
}
return ''
}
},
mounted () {
@ -404,12 +410,6 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
},
favouritesCount () {
if (this.originalMessage.favourites_count > 0) {
return this.originalMessage.favourites_count
}
return ''
},
isMyMessage () {
return this.$store.state.TimelineSpace.account.accountId === this.originalMessage.account.id
},