mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 06:57:09 +03:00
Don't show upload and delete button when no complete segments
This commit is contained in:
@@ -1143,10 +1143,10 @@ function updateEditButtonsOnPlayer(): void {
|
|||||||
creatingSegment = isSegmentCreationInProgress();
|
creatingSegment = isSegmentCreationInProgress();
|
||||||
|
|
||||||
// Show only if there are any segments to submit
|
// Show only if there are any segments to submit
|
||||||
submitButtonVisible = sponsorTimesSubmitting.length > 0;
|
submitButtonVisible = sponsorTimesSubmitting.length > 1 || (sponsorTimesSubmitting.length > 0 && !creatingSegment);
|
||||||
|
|
||||||
// Show only if there are any segments to delete
|
// Show only if there are any segments to delete
|
||||||
deleteButtonVisible = sponsorTimesSubmitting.length > 0;
|
deleteButtonVisible = sponsorTimesSubmitting.length > 1 || (sponsorTimesSubmitting.length > 0 && !creatingSegment);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the elements
|
// Update the elements
|
||||||
|
|||||||
Reference in New Issue
Block a user