Fix refresh button in popup

This commit is contained in:
Ajay
2025-07-09 03:19:18 -04:00
parent 87c4758089
commit 63f9bd5926

View File

@@ -103,15 +103,18 @@ export const PopupComponent = () => {
<button id="refreshSegmentsButton" title={chrome.i18n.getMessage("refreshSegments")} onClick={(e) => { <button id="refreshSegmentsButton" title={chrome.i18n.getMessage("refreshSegments")} onClick={(e) => {
const stopAnimation = AnimationUtils.applyLoadingAnimation(e.currentTarget, 0.3); const stopAnimation = AnimationUtils.applyLoadingAnimation(e.currentTarget, 0.3);
loadSegments({ sendMessage({ message: "refreshSegments" }).then(() => {
updating: true, loadSegments({
setStatus, updating: true,
setChannelWhitelisted, setStatus,
setVideoID, setChannelWhitelisted,
setCurrentTime, setVideoID,
setSegments, setCurrentTime,
setLoopedChapter setSegments,
}).then(() => stopAnimation()); setLoopedChapter
}).then(() => stopAnimation());
});
}}> }}>
<img src="/icons/refresh.svg" alt="Refresh icon" id="refreshSegments" /> <img src="/icons/refresh.svg" alt="Refresh icon" id="refreshSegments" />
</button> </button>