mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-21 17:01:25 -07:00
Drop 16 overlay preload methods with no caller (onSubtitleAss, getCurrentSubtitleAss, onVisibility, getOverlayVisibility, openYomitanSettings, quitApp, toggleOverlay, getMecabStatus, setMecabEnabled, getKeybindings, saveControllerPreference, getAnkiConnectStatus, setAnkiConnectEnabled, clearAnkiConnectHistory, cycleRuntimeOption, appendClipboardVideoToQueue) along with their IPC_CHANNELS keys, handlers, validators and dep plumbing. With both ASS consumers gone, stop observing sub-text/ass in mpv and remove the subtitle-ass-change event chain and appState.currentSubAssText. The main-process functions these wrapped stay; tray, CLI, shortcuts and session actions still use them.
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import {
|
|
createIpcDepsRuntime,
|
|
registerAnkiJimakuIpcRuntime,
|
|
registerIpcHandlers,
|
|
} from '../core/services';
|
|
import { registerAnkiJimakuIpcHandlers } from '../core/services/anki-jimaku-ipc';
|
|
import {
|
|
createAnkiJimakuIpcRuntimeServiceDeps,
|
|
AnkiJimakuIpcRuntimeServiceDepsParams,
|
|
createMainIpcRuntimeServiceDeps,
|
|
MainIpcRuntimeServiceDepsParams,
|
|
createRuntimeOptionsIpcDeps,
|
|
RuntimeOptionsIpcDepsParams,
|
|
} from './dependencies';
|
|
|
|
export interface RegisterIpcRuntimeServicesParams {
|
|
runtimeOptions: RuntimeOptionsIpcDepsParams;
|
|
mainDeps: Omit<MainIpcRuntimeServiceDepsParams, 'setRuntimeOption'>;
|
|
ankiJimakuDeps: AnkiJimakuIpcRuntimeServiceDepsParams;
|
|
}
|
|
|
|
export function registerMainIpcRuntimeServices(params: MainIpcRuntimeServiceDepsParams): void {
|
|
registerIpcHandlers(createIpcDepsRuntime(createMainIpcRuntimeServiceDeps(params)));
|
|
}
|
|
|
|
export function registerAnkiJimakuIpcRuntimeServices(
|
|
params: AnkiJimakuIpcRuntimeServiceDepsParams,
|
|
): void {
|
|
registerAnkiJimakuIpcRuntime(
|
|
createAnkiJimakuIpcRuntimeServiceDeps(params),
|
|
registerAnkiJimakuIpcHandlers,
|
|
);
|
|
}
|
|
|
|
export function registerIpcRuntimeServices(params: RegisterIpcRuntimeServicesParams): void {
|
|
const runtimeOptionsIpcDeps = createRuntimeOptionsIpcDeps({
|
|
getRuntimeOptionsManager: params.runtimeOptions.getRuntimeOptionsManager,
|
|
showMpvOsd: params.runtimeOptions.showMpvOsd,
|
|
});
|
|
registerMainIpcRuntimeServices({
|
|
...params.mainDeps,
|
|
setRuntimeOption: runtimeOptionsIpcDeps.setRuntimeOption,
|
|
});
|
|
registerAnkiJimakuIpcRuntimeServices(params.ankiJimakuDeps);
|
|
}
|