Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openless-all/app/src/components/AudioCue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function AudioCueListener() {
listen<UserPreferences>('prefs:changed', (event) => {
const next = event.payload;
if (next) audioCueEnabledRef.current = next.audioCueOnRecord !== false;
}).then(fn => { if (!cancelled) unlisten = fn; }).catch(() => {});
}).then(fn => { if (cancelled) fn(); else unlisten = fn; }).catch(() => {});
})();
return () => { cancelled = true; unlisten?.(); };
}, [audioCueRuntimeEnabled]);
Expand All @@ -73,7 +73,7 @@ export function AudioCueListener() {
} else if (state !== 'recording' && prev === 'recording') {
stopAudioCue();
}
}).then(fn => { if (!cancelled) unlisten = fn; }).catch(() => {});
}).then(fn => { if (cancelled) fn(); else unlisten = fn; }).catch(() => {});
})();
return () => { cancelled = true; unlisten?.(); };
}, [audioCueRuntimeEnabled]);
Expand Down
3 changes: 2 additions & 1 deletion openless-all/app/src/components/WindowChrome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ function LinuxTitlebar() {
if (!cancelled) setMaximized(m);
}).catch(() => {});
}).then((fn) => {
if (!cancelled) unlisten = fn;
if (cancelled) fn();
else unlisten = fn;
}).catch(() => {});
}).catch(() => {});
return () => {
Expand Down
Loading