Skip to content

Commit

Permalink
Merge pull request #277 from h3poteto/iss-256
Browse files Browse the repository at this point in the history
closes #256 Show favourites count in toot
  • Loading branch information
h3poteto authored Apr 29, 2018
2 parents 7459455 + 384c3a7 commit 07d510c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<el-button type="text" @click="changeFavourite(originalMessage(message))" :class="originalMessage(message).favourited ? 'favourited animated bounceIn' : 'favourite'">
<icon name="star" scale="0.9"></icon>
</el-button>
<span class="count">
{{ favouritesCount(message) }}
</span>
<popper trigger="click" :options="{placement: 'bottom'}">
<div class="popper toot-menu">
<ul class="menu-list">
Expand Down Expand Up @@ -215,6 +218,12 @@ export default {
return this.originalMessage(message).reblogs_count
}
return ''
},
favouritesCount (message) {
if (this.originalMessage(message).favourites_count > 0) {
return this.originalMessage(message).favourites_count
}
return ''
}
}
}
Expand Down

0 comments on commit 07d510c

Please sign in to comment.