Skip to content

Conversation

@zapdos26
Copy link
Contributor

Added Unlock feature;
Made a dynamic dropdown;
Moved vote option creation to PollHelpers
Prevent button press processing when vote is locked;
Changed how "isLocked" status is determined;
Add notification to user if their vote was blocked due to it being locked.
Remove empty votes from results;
Remove null from section, because null causes errors when sending the message;
Ran ESlint;

Made a dynamic dropdown;
Moved vote option creation to PollHelpers
Prevent button press processing when vote is locked;
Changed how "isLocked" status is determined;
Add notification to user if their vote was blocked due to it being locked.
Remove empty votes from results;
Remove null from section, because null causes errors when sending the message.
}
}

private onUnlockSelected(payload: any, poll: Poll): void {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

this.isLocked = true;
this.generateVoteResults();
this.message = this.message.slice(0, 2).concat(this.message.slice(this.getDividerId() - 1));
this.message = this.message.slice(0, this.getDividerId() - 1).concat(this.getDynamicSelect()).concat(this.message.slice(this.getDividerId()));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.


public unlockpoll(): void {
this.isLocked = false;
this.message = this.message.slice(0, this.getDividerId() - 1).concat(this.getDynamicSelect()).concat({type: "divider"}).concat(this.message.slice(this.getDividerId() + 2));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit b28ae50 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

View more on Code Climate.

@zapdos26 zapdos26 mentioned this pull request Dec 21, 2019
@zapdos26 zapdos26 changed the base branch from master to dev December 21, 2019 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants