diff --git a/Tusker/Views/Poll/StatusPollView.swift b/Tusker/Views/Poll/StatusPollView.swift index 27c38817..a428becf 100644 --- a/Tusker/Views/Poll/StatusPollView.swift +++ b/Tusker/Views/Poll/StatusPollView.swift @@ -95,7 +95,7 @@ class StatusPollView: UIView { guard let poll = poll else { return } // poll.voted is nil if there is no user (e.g., public timeline), in which case the poll also cannot be voted upon - if (poll.voted ?? true) || poll.expired || status.account.id == mastodonController.account.id { + if (poll.voted ?? true) || poll.expired || status.account.id == mastodonController.account?.id { canVote = false } else { canVote = true @@ -126,7 +126,7 @@ class StatusPollView: UIView { if expired { voteButton.disabledTitle = "Expired" } else if poll.voted ?? false { - if status.account.id == mastodonController.account.id { + if status.account.id == mastodonController.account?.id { voteButton.isHidden = true } else { voteButton.disabledTitle = "Voted" diff --git a/Tusker/Views/Status/BaseStatusTableViewCell.swift b/Tusker/Views/Status/BaseStatusTableViewCell.swift index 3e9122d1..98a32dda 100644 --- a/Tusker/Views/Status/BaseStatusTableViewCell.swift +++ b/Tusker/Views/Status/BaseStatusTableViewCell.swift @@ -170,7 +170,7 @@ class BaseStatusTableViewCell: UITableViewCell { let reblogDisabled: Bool if mastodonController.instanceFeatures.boostToOriginalAudience { // Pleroma allows 'Boost to original audience' for your own private posts - reblogDisabled = status.visibility == .direct || (status.visibility == .private && status.account.id != mastodonController.account.id) + reblogDisabled = status.visibility == .direct || (status.visibility == .private && status.account.id != mastodonController.account?.id) } else { reblogDisabled = status.visibility == .private || status.visibility == .direct } diff --git a/Tusker/Views/Status/StatusCollectionViewCell.swift b/Tusker/Views/Status/StatusCollectionViewCell.swift index 6e46875b..da7f39f9 100644 --- a/Tusker/Views/Status/StatusCollectionViewCell.swift +++ b/Tusker/Views/Status/StatusCollectionViewCell.swift @@ -131,7 +131,7 @@ extension StatusCollectionViewCell { } if status.visibility == .direct || status.visibility == .private { if mastodonController.instanceFeatures.boostToOriginalAudience, - status.account.id == mastodonController.account.id { + status.account.id == mastodonController.account?.id { return true } return false