mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
fix: simplify mpv sub-visibility suppression and gate yomitan sync state
This commit is contained in:
@@ -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'],
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user