mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Show visibility levels on reblog button
This commit is contained in:
parent
a1d43e8c5f
commit
b7f792a7d7
1 changed files with 15 additions and 1 deletions
|
@ -683,9 +683,23 @@ private extension StatusView {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setButtonImages(scale: UIImage.SymbolScale) {
|
func setButtonImages(scale: UIImage.SymbolScale) {
|
||||||
|
let visibility = statusConfiguration.viewModel.visibility
|
||||||
|
let reblogSystemImageName: String
|
||||||
|
|
||||||
|
if statusConfiguration.viewModel.configuration.isContextParent {
|
||||||
|
reblogSystemImageName = "arrow.2.squarepath"
|
||||||
|
} else {
|
||||||
|
switch visibility {
|
||||||
|
case .public, .unlisted:
|
||||||
|
reblogSystemImageName = "arrow.2.squarepath"
|
||||||
|
default:
|
||||||
|
reblogSystemImageName = visibility.systemImageName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
replyButton.setImage(UIImage(systemName: "bubble.right",
|
replyButton.setImage(UIImage(systemName: "bubble.right",
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
||||||
reblogButton.setImage(UIImage(systemName: "arrow.2.squarepath",
|
reblogButton.setImage(UIImage(systemName: reblogSystemImageName,
|
||||||
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), for: .normal)
|
withConfiguration: UIImage.SymbolConfiguration(scale: scale)), 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(scale: scale)), for: .normal)
|
||||||
|
|
Loading…
Reference in a new issue