-
-
Notifications
You must be signed in to change notification settings - Fork 2
Added "Unlock" Feature #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Made a dynamic dropdown; Moved vote option creation to Static;
Prevent button press processing when vote is locked; Changed how "isLocked" status is determined Added "Collect" to getDynamicSelect(); Removed vote builder in unlockpoll() since its no longer needed
| const users: string[] = votes[key].split(","); | ||
| users.splice(0, 1); | ||
| // Don"t bother with empty votes | ||
| if (users.length === 0) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we're now going to show an option if it has 0 votes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally, yes. However since there appears to be a want for anonymous polling, we can re-add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well even with non anonymous polling we don't want to show votes with 0 people in the results block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to though, otherwise how will we know what the vote options are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it looks like you kept the buttons but disabled voting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were previous iterations (see previous commits) where the buttons were deleted. However I re-added the buttons since they store information in regards to who voted. Since we kept the buttons, this will be re-added.
Remove null from section, because null causes errors when sending the message.
| const newActionBlock: ActionsBlock = { type: "actions", elements: [] }; | ||
| actionBlocks.push(newActionBlock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just make this one line if we're not going to re-use the defined constant again.
| const button: Button = { type: "button", value: " ", text: Static.buildTextElem(parameters[i]) }; | ||
| actionBlocks[actionBlockCount].elements.push(button); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
|
Opened new PR (#46) to fix merging issues. |
Added "Unlock" Feature;
Made a dynamic dropdown;
Moved vote option creation to Static;