mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-01 06:22:44 -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', 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') {
|
} 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({
|
||||||
|
|||||||
@@ -2510,9 +2510,9 @@ 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 {
|
||||||
return createOverlayWindowHandler(kind);
|
return createOverlayWindowHandler(kind);
|
||||||
|
|||||||
Reference in New Issue
Block a user