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.
Does this mean we're now going to show an option if it has 0 votes?
There was a problem hiding this comment.
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.
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.
We need to though, otherwise how will we know what the vote options are?
There was a problem hiding this comment.
But it looks like you kept the buttons but disabled voting.
There was a problem hiding this comment.
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.
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); |
|
Opened new PR (#46) to fix merging issues. |
Added "Unlock" Feature;
Made a dynamic dropdown;
Moved vote option creation to Static;