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 d588a2154d
commit 76c9b37cda
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', 'no'],
},
{
command: ['set', 'sub-visibility', 'no'],
},
]);
});

View File

@@ -219,8 +219,6 @@ export async function dispatchMpvProtocolMessage(
} else if (msg.name === 'sub-visibility') {
if (deps.isVisibleOverlayVisible() && asBoolean(msg.data, 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') {
deps.emitSubtitleMetricsChange({

View File

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