fix: simplify mpv sub-visibility suppression and gate yomitan sync state

This commit is contained in:
2026-02-27 23:18:57 -08:00
parent 3f1702b0f6
commit 9e0c5e478e
3 changed files with 1 additions and 9 deletions

View File

@@ -133,12 +133,6 @@ test('dispatchMpvProtocolMessage enforces sub-visibility hidden when overlay sup
{ {
command: ['set_property', 'sub-visibility', false], command: ['set_property', 'sub-visibility', false],
}, },
{
command: ['set_property', 'sub-visibility', 'no'],
},
{
command: ['set', 'sub-visibility', 'no'],
},
]); ]);
}); });

View File

@@ -219,8 +219,6 @@ export async function dispatchMpvProtocolMessage(
} else if (msg.name === 'sub-visibility') { } else if (msg.name === 'sub-visibility') {
if (deps.isVisibleOverlayVisible() && asBoolean(msg.data, false)) { if (deps.isVisibleOverlayVisible() && asBoolean(msg.data, false)) {
deps.sendCommand({ command: ['set_property', 'sub-visibility', false] }); deps.sendCommand({ command: ['set_property', 'sub-visibility', false] });
deps.sendCommand({ command: ['set_property', 'sub-visibility', 'no'] });
deps.sendCommand({ command: ['set', 'sub-visibility', 'no'] });
} }
} else if (msg.name === 'sub-use-margins') { } else if (msg.name === 'sub-use-margins') {
deps.emitSubtitleMetricsChange({ deps.emitSubtitleMetricsChange({

View File

@@ -2510,8 +2510,8 @@ async function syncYomitanDefaultProfileAnkiServer(): Promise<void> {
if (updated) { if (updated) {
logger.info(`Yomitan default profile Anki server set to ${targetUrl}`); logger.info(`Yomitan default profile Anki server set to ${targetUrl}`);
lastSyncedYomitanAnkiServer = targetUrl;
} }
lastSyncedYomitanAnkiServer = targetUrl;
} }
function createOverlayWindow(kind: 'visible' | 'modal'): BrowserWindow { function createOverlayWindow(kind: 'visible' | 'modal'): BrowserWindow {