From 25236f3a191faf35cd20e94119142b6420057cbe Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 21 May 2021 17:00:42 -0400 Subject: [PATCH] Don't show upload and delete button when no complete segments --- src/content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index dab1e23f..ff9f3769 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1143,10 +1143,10 @@ function updateEditButtonsOnPlayer(): void { creatingSegment = isSegmentCreationInProgress(); // 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 - deleteButtonVisible = sponsorTimesSubmitting.length > 0; + deleteButtonVisible = sponsorTimesSubmitting.length > 1 || (sponsorTimesSubmitting.length > 0 && !creatingSegment); } // Update the elements