mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-06-09 15:13:32 -07:00
fix(startup): release autoplay gate before first subtitle line
- Send synthetic `__warm__` payload when no current subtitle exists so the gate can release without waiting for a subtitle event that can't fire while paused - Visible-overlay readiness accepts `__warm__` once the overlay is content-ready, rejects it otherwise - Autoplay gate self-retries via scheduled polling when signal target isn't ready, removing reliance on an external flush event - Skip duplicate desktop notification when overlay or startup sequencer already delivered it
This commit is contained in:
@@ -35,6 +35,8 @@ export function notifyCharacterDictionaryAutoSyncStatus(
|
||||
): void {
|
||||
const type = deps.getNotificationType() ?? 'overlay';
|
||||
if (type === 'none') return;
|
||||
let overlayShown = false;
|
||||
let startupSequencerShown = false;
|
||||
|
||||
if (shouldShowOverlay(type)) {
|
||||
if (deps.showOverlayNotification) {
|
||||
@@ -45,6 +47,7 @@ export function notifyCharacterDictionaryAutoSyncStatus(
|
||||
variant: overlayVariantForPhase(event.phase),
|
||||
persistent: !isTerminalPhase(event.phase),
|
||||
});
|
||||
overlayShown = true;
|
||||
} else if (!shouldShowDesktop(type)) {
|
||||
deps.showDesktopNotification('SubMiner', { body: event.message });
|
||||
}
|
||||
@@ -52,7 +55,7 @@ export function notifyCharacterDictionaryAutoSyncStatus(
|
||||
|
||||
if (shouldShowOsd(type)) {
|
||||
if (deps.startupOsdSequencer) {
|
||||
deps.startupOsdSequencer.notifyCharacterDictionaryStatus({
|
||||
startupSequencerShown = deps.startupOsdSequencer.notifyCharacterDictionaryStatus({
|
||||
phase: event.phase,
|
||||
message: event.message,
|
||||
});
|
||||
@@ -61,7 +64,7 @@ export function notifyCharacterDictionaryAutoSyncStatus(
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldShowDesktop(type)) {
|
||||
if (shouldShowDesktop(type) && !overlayShown && !startupSequencerShown) {
|
||||
deps.showDesktopNotification('SubMiner', { body: event.message });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user