feat: display count for reply button

This commit is contained in:
CMK 2021-02-23 15:23:18 +08:00
parent 40a524434f
commit a90643552a
1 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,12 @@ extension TimelineSection {
cell.statusView.activeTextLabel.config(content: (toot.reblog ?? toot).content)
// toolbar
let replyCountTitle: String = {
let count = (toot.reblog ?? toot).repliesCount?.intValue ?? 0
return TimelineSection.formattedNumberTitleForActionButton(count)
}()
cell.statusView.actionToolbarContainer.replyButton.setTitle(replyCountTitle, for: .normal)
let isLike = (toot.reblog ?? toot).favouritedBy.flatMap { $0.contains(where: { $0.id == requestUserID }) } ?? false
let favoriteCountTitle: String = {
let count = (toot.reblog ?? toot).favouritesCount.intValue