()
| 758 | } |
| 759 | |
| 760 | public async finishWatchingMessage(): Promise<boolean> { |
| 761 | const currentScore = this.getScoreCheckboxValue(); |
| 762 | |
| 763 | let checkHtml = |
| 764 | '<div><select id="finish_score" style="margin-top:5px; color:white; background-color:#4e4e4e; border: none;">'; |
| 765 | this.getScoreCheckbox().forEach(el => { |
| 766 | checkHtml += `<option value="${el.value}" ${currentScore === el.value ? 'selected' : ''}>${ |
| 767 | el.label |
| 768 | }</option>`; |
| 769 | }); |
| 770 | checkHtml += '</select></div>'; |
| 771 | |
| 772 | return utils |
| 773 | .flashConfirm(api.storage.lang('syncPage_flashConfirm_complete') + checkHtml, 'complete') |
| 774 | .then(res => { |
| 775 | if (res) { |
| 776 | this.setStatus(definitions.status.Completed); |
| 777 | this.setFinishDate(returnYYYYMMDD()); |
| 778 | if (!this.getStartDate()) { |
| 779 | this.setStartDate(returnYYYYMMDD()); |
| 780 | } |
| 781 | const finishScore = Number(j.$('#finish_score').val()); |
| 782 | if (finishScore > 0) { |
| 783 | this.logger.log(`finish_score: ${j.$('#finish_score :selected').val()}`); |
| 784 | this.handleScoreCheckbox(j.$('#finish_score :selected').val()); |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | return res; |
| 789 | }); |
| 790 | } |
| 791 | |
| 792 | public async startRewatchingMessage(): Promise<boolean> { |
| 793 | return utils |
nothing calls this directly
no test coverage detected