Skip to content

Commit 9b1ad3e

Browse files
committed
fix: Small fixes
1 parent 4a3a75f commit 9b1ad3e

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

projects/sample-app/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
></stream-poll-preview>
7272
</ng-container>
7373
<ng-template #poll>
74-
<stream-poll [pollId]="pollId" [messageId]="messageId"> </stream-poll>
74+
<stream-poll [pollId]="pollId" [messageId]="messageId"></stream-poll>
7575
</ng-template>
7676
</ng-template>
7777

projects/stream-chat-angular/src/lib/polls/base-poll.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ export abstract class BasePollComponent
118118
protected markForCheck(): void {
119119
if (this.isViewInited) {
120120
this.cdRef.detectChanges();
121-
this.capabilitySubscription?.unsubscribe();
122121
}
123122
}
124123
}

projects/stream-chat-angular/src/lib/polls/poll-option-selector/poll-option-selector.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<div
22
class="str-chat__poll-option"
33
[class.str-chat__poll-option--votable]="
4+
!isClosed &&
45
canVote &&
56
maxVoteAllowedCount &&
67
ownVoteCount < maxVoteAllowedCount &&

projects/stream-chat-angular/src/lib/polls/poll-option-selector/poll-option-selector.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export class PollOptionSelectorComponent
4848
}
4949

5050
async toggleVote() {
51-
if (!this.canVote || !this.option?.id || !this.messageId) return;
51+
if (!this.canVote || !this.option?.id || !this.messageId || this.isClosed)
52+
return;
5253
const haveVotedForTheOption = !!this.ownVote;
5354
if (
5455
!haveVotedForTheOption &&

0 commit comments

Comments
 (0)