mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Make boost button bold when status is boosted for increased visibility
This commit is contained in:
parent
13a732b5e3
commit
dd06a84ec6
1 changed files with 16 additions and 7 deletions
|
@ -599,7 +599,9 @@ private extension StatusView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setButtonImages(scale: isContextParent ? .medium : .small)
|
setButtonImages(font: isContextParent
|
||||||
|
? .preferredFont(forTextStyle: .title3)
|
||||||
|
: .preferredFont(forTextStyle: .subheadline))
|
||||||
|
|
||||||
replyButton.setCountTitle(count: viewModel.repliesCount, isContextParent: isContextParent)
|
replyButton.setCountTitle(count: viewModel.repliesCount, isContextParent: isContextParent)
|
||||||
replyButton.isEnabled = isAuthenticated
|
replyButton.isEnabled = isAuthenticated
|
||||||
|
@ -811,7 +813,7 @@ private extension StatusView {
|
||||||
return accessibilityAttributedLabel
|
return accessibilityAttributedLabel
|
||||||
}
|
}
|
||||||
|
|
||||||
func setButtonImages(scale: UIImage.SymbolScale) {
|
func setButtonImages(font: UIFont) {
|
||||||
let visibility = statusConfiguration.viewModel.visibility
|
let visibility = statusConfiguration.viewModel.visibility
|
||||||
let reblogSystemImageName: String
|
let reblogSystemImageName: String
|
||||||
|
|
||||||
|
@ -827,15 +829,22 @@ private extension StatusView {
|
||||||
}
|
}
|
||||||
|
|
||||||
replyButton.setImage(UIImage(systemName: "bubble.right",
|
replyButton.setImage(UIImage(systemName: "bubble.right",
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(pointSize: font.pointSize)),
|
||||||
|
for: .normal)
|
||||||
reblogButton.setImage(UIImage(systemName: reblogSystemImageName,
|
reblogButton.setImage(UIImage(systemName: reblogSystemImageName,
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(
|
||||||
|
pointSize: font.pointSize,
|
||||||
|
weight: statusConfiguration.viewModel.reblogged ? .bold : .regular)),
|
||||||
|
for: .normal)
|
||||||
favoriteButton.setImage(UIImage(systemName: statusConfiguration.viewModel.favorited ? "star.fill" : "star",
|
favoriteButton.setImage(UIImage(systemName: statusConfiguration.viewModel.favorited ? "star.fill" : "star",
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(pointSize: font.pointSize)),
|
||||||
|
for: .normal)
|
||||||
shareButton.setImage(UIImage(systemName: "square.and.arrow.up",
|
shareButton.setImage(UIImage(systemName: "square.and.arrow.up",
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(pointSize: font.pointSize)),
|
||||||
|
for: .normal)
|
||||||
menuButton.setImage(UIImage(systemName: "ellipsis",
|
menuButton.setImage(UIImage(systemName: "ellipsis",
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(pointSize: font.pointSize)),
|
||||||
|
for: .normal)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func reblogButtonDoubleTap(sender: UIButton, event: UIEvent) {
|
@objc func reblogButtonDoubleTap(sender: UIButton, event: UIEvent) {
|
||||||
|
|
Loading…
Reference in a new issue