[frontend/components] Don't allow repeated multiple choice votes
This commit is contained in:
parent
6c31197bbc
commit
e091eb01e9
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
private bool CanVote()
|
private bool CanVote()
|
||||||
{
|
{
|
||||||
return (Poll.Multiple && !Poll.Choices.All(p => p.Voted) || !Poll.Choices.Any(p => p.Voted)) && (Poll.ExpiresAt == null || Poll.ExpiresAt > DateTime.UtcNow);
|
return !Poll.Choices.Any(p => p.Voted) && (Poll.ExpiresAt == null || Poll.ExpiresAt > DateTime.UtcNow);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectMultiple(int choice)
|
private void SelectMultiple(int choice)
|
||||||
|
|
Loading…
Add table
Reference in a new issue