Skip to content

Commit 8903e77

Browse files
authored
Fix PollOptionAllVotesView not updated on poll cast events (#1025)
* Fix PollOptionAllVotesView not updated on poll events * Update CHANGELOG.md
1 parent 07d4e0e commit 8903e77

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
99
- Allows dismissing the keyboard attachments picker when tapping the message list [#1024](https://github.com/GetStream/stream-chat-swiftui/pull/1024)
1010
### 🐞 Fixed
1111
- Fix composer not being locked after the channel was frozen [#1015](https://github.com/GetStream/stream-chat-swiftui/pull/1015)
12+
- Fix `PollOptionAllVotesView` not updated on poll cast events [#1025](https://github.com/GetStream/stream-chat-swiftui/pull/1025)
1213

1314
# [4.90.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.90.0)
1415
_October 08, 2025_

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import StreamChat
77
import SwiftUI
88

99
class PollOptionAllVotesViewModel: ObservableObject, PollVoteListControllerDelegate {
10-
let poll: Poll
1110
let option: PollOption
1211
let controller: PollVoteListController
13-
12+
13+
@Published var poll: Poll
1414
@Published var pollVotes = [PollVote]()
1515
@Published var errorShown = false
1616

@@ -70,7 +70,11 @@ class PollOptionAllVotesViewModel: ObservableObject, PollVoteListControllerDeleg
7070
pollVotes = Array(controller.votes)
7171
}
7272
}
73-
73+
74+
func controller(_ controller: PollVoteListController, didUpdatePoll poll: Poll) {
75+
self.poll = poll
76+
}
77+
7478
private func loadVotes() {
7579
loadingVotes = true
7680

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,8 +3945,8 @@
39453945
isa = XCRemoteSwiftPackageReference;
39463946
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
39473947
requirement = {
3948-
kind = upToNextMajorVersion;
3949-
minimumVersion = 4.90.0;
3948+
branch = develop;
3949+
kind = branch;
39503950
};
39513951
};
39523952
E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {

0 commit comments

Comments
 (0)