Add animation to segment hiding

This commit is contained in:
Ajay
2022-02-06 21:08:15 -05:00
parent e4ba67999c
commit 53d0ac8677

View File

@@ -486,6 +486,9 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
hideButton.src = chrome.runtime.getURL("icons/visible.svg");
}
hideButton.addEventListener("click", () => {
const stopAnimation = AnimationUtils.applyLoadingAnimation(hideButton, 0.4);
stopAnimation();
if (segmentTimes[i].hidden === SponsorHideType.Hidden) {
hideButton.src = chrome.runtime.getURL("icons/visible.svg");
segmentTimes[i].hidden = SponsorHideType.Visible;