Don't show Voted button for polls that you authored

This commit is contained in:
Shadowfacts 2021-05-03 23:18:15 -04:00
parent 005001b081
commit e18a09f4ac
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 5 additions and 1 deletions

View File

@ -114,7 +114,11 @@ class StatusPollView: UIView {
if expired { if expired {
voteButton.setTitle("Expired", for: .disabled) voteButton.setTitle("Expired", for: .disabled)
} else if poll.voted ?? false { } else if poll.voted ?? false {
if status.account.id == mastodonController.account.id {
voteButton.setTitle("", for: .disabled)
} else {
voteButton.setTitle("Voted", for: .disabled) voteButton.setTitle("Voted", for: .disabled)
}
} else if poll.multiple { } else if poll.multiple {
voteButton.setTitle("Select multiple", for: .disabled) voteButton.setTitle("Select multiple", for: .disabled)
} else { } else {