Skip to content

Commit 63f9bd5

Browse files
committed
Fix refresh button in popup
1 parent 87c4758 commit 63f9bd5

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/popup/PopupComponent.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,18 @@ export const PopupComponent = () => {
103103
<button id="refreshSegmentsButton" title={chrome.i18n.getMessage("refreshSegments")} onClick={(e) => {
104104
const stopAnimation = AnimationUtils.applyLoadingAnimation(e.currentTarget, 0.3);
105105

106-
loadSegments({
107-
updating: true,
108-
setStatus,
109-
setChannelWhitelisted,
110-
setVideoID,
111-
setCurrentTime,
112-
setSegments,
113-
setLoopedChapter
114-
}).then(() => stopAnimation());
106+
sendMessage({ message: "refreshSegments" }).then(() => {
107+
loadSegments({
108+
updating: true,
109+
setStatus,
110+
setChannelWhitelisted,
111+
setVideoID,
112+
setCurrentTime,
113+
setSegments,
114+
setLoopedChapter
115+
}).then(() => stopAnimation());
116+
});
117+
115118
}}>
116119
<img src="/icons/refresh.svg" alt="Refresh icon" id="refreshSegments" />
117120
</button>

0 commit comments

Comments
 (0)