Changed to upvote/downvote from report

This commit is contained in:
Ajay Ramachandran
2020-05-20 23:32:57 -04:00
parent 05acb1669e
commit ef17cae9a1
6 changed files with 142 additions and 17 deletions

View File

@@ -1376,9 +1376,7 @@ function vote(type: number, UUID: string, category?: string, skipNotice?: SkipNo
if (skipNotice != null) {
if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
//success (treat rate limits as a success)
if (type === 0 || category) {
skipNotice.afterDownvote.bind(skipNotice)(utils.getSponsorTimeFromUUID(sponsorTimes, UUID), type, category);
}
skipNotice.afterVote.bind(skipNotice)(utils.getSponsorTimeFromUUID(sponsorTimes, UUID), type, category);
} else if (response.successType == 0) {
//failure: duplicate vote
skipNotice.setNoticeInfoMessage.bind(skipNotice)(chrome.i18n.getMessage("voteFail"))