Skip to content

Commit ad7732d

Browse files
Always show add comments button for anon polls (#506)
1 parent 595d15e commit ad7732d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/StreamChatSwiftUI/ChatChannel/MessageList/Polls/PollAttachmentViewModel.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ public class PollAttachmentViewModel: ObservableObject, PollControllerDelegate {
8383

8484
/// If true, add comment button is visible under votes, otherwise hidden.
8585
public var showAddCommentButton: Bool {
86-
!poll.isClosed
86+
if poll.votingVisibility == .anonymous {
87+
return true
88+
}
89+
return !poll.isClosed
8790
&& poll.allowAnswers == true
8891
&& (
8992
poll.latestAnswers.filter {

0 commit comments

Comments
 (0)