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,6 +103,7 @@ 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);
sendMessage({ message: "refreshSegments" }).then(() => {
loadSegments({ loadSegments({
updating: true, updating: true,
setStatus, setStatus,
@@ -112,6 +113,8 @@ export const PopupComponent = () => {
setSegments, setSegments,
setLoopedChapter setLoopedChapter
}).then(() => stopAnimation()); }).then(() => stopAnimation());
});
}}> }}>
<img src="/icons/refresh.svg" alt="Refresh icon" id="refreshSegments" /> <img src="/icons/refresh.svg" alt="Refresh icon" id="refreshSegments" />
</button> </button>