diff --git a/Tusker/Views/Status/BaseStatusTableViewCell.swift b/Tusker/Views/Status/BaseStatusTableViewCell.swift index 61e2e023..bb50ee2e 100644 --- a/Tusker/Views/Status/BaseStatusTableViewCell.swift +++ b/Tusker/Views/Status/BaseStatusTableViewCell.swift @@ -141,6 +141,18 @@ class BaseStatusTableViewCell: UITableViewCell { contentWarningLabel.setEmojis(status.emojis, identifier: statusID) } + let reblogDisabled: Bool + switch mastodonController.instance.instanceType { + case .mastodon: + reblogDisabled = status.visibility == .private || status.visibility == .direct + case .pleroma: + // Pleroma allows 'Boost to original audience' for your own private posts + reblogDisabled = status.visibility == .direct || (status.visibility == .private && status.account.id != mastodonController.account.id) + } + reblogButton.isEnabled = !reblogDisabled + let reblogButtonImage = reblogDisabled ? UIImage(systemName: status.visibility.imageName) : UIImage(systemName: "repeat") + reblogButton.setImage(reblogButtonImage, for: .normal) + if state.unknown { collapsible = !status.spoilerText.isEmpty var shouldCollapse = collapsible