@@ -25,34 +25,24 @@ class ActivityEventHandler implements StateEventHandler {
2525 @override
2626 void handleEvent (WsEvent event) {
2727 if (event is api.PollClosedFeedEvent ) {
28- // Only handle events for this specific feed
29- if (event.fid != fid.rawValue) return ;
3028 return state.onPollClosed (event.poll.toModel ());
3129 }
3230
3331 if (event is api.PollDeletedFeedEvent ) {
34- // Only handle events for this specific feed
35- if (event.fid != fid.rawValue) return ;
3632 return state.onPollDeleted (event.poll.id);
3733 }
3834
3935 if (event is api.PollUpdatedFeedEvent ) {
40- // Only handle events for this specific feed
41- if (event.fid != fid.rawValue) return ;
4236 return state.onPollUpdated (event.poll.toModel ());
4337 }
4438
4539 if (event is PollAnswerCastedFeedEvent ) {
46- // Only handle events for this specific feed
47- if (event.fid != fid.rawValue) return ;
4840 final answer = event.pollVote.toModel ();
4941 final poll = event.poll.toModel ();
5042 return state.onPollAnswerCasted (answer, poll);
5143 }
5244
5345 if (event is api.PollVoteCastedFeedEvent ) {
54- // Only handle events for this specific feed
55- if (event.fid != fid.rawValue) return ;
5646 final vote = event.pollVote.toModel ();
5747 final poll = event.poll.toModel ();
5848 return state.onPollVoteCasted (vote, poll);
@@ -67,16 +57,12 @@ class ActivityEventHandler implements StateEventHandler {
6757 }
6858
6959 if (event is PollAnswerRemovedFeedEvent ) {
70- // Only handle events for this specific feed
71- if (event.fid != fid.rawValue) return ;
7260 final vote = event.pollVote.toModel ();
7361 final poll = event.poll.toModel ();
7462 return state.onPollAnswerRemoved (vote, poll);
7563 }
7664
7765 if (event is api.PollVoteRemovedFeedEvent ) {
78- // Only handle events for this specific feed
79- if (event.fid != fid.rawValue) return ;
8066 final vote = event.pollVote.toModel ();
8167 final poll = event.poll.toModel ();
8268 return state.onPollVoteRemoved (vote, poll);
0 commit comments