mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-01 06:22:44 -08:00
refactor: split main runtime wrappers into focused modules
This commit is contained in:
38
src/main/runtime/overlay-shortcuts-lifecycle.ts
Normal file
38
src/main/runtime/overlay-shortcuts-lifecycle.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
type OverlayShortcutsRuntimeLike = {
|
||||
registerOverlayShortcuts: () => void;
|
||||
unregisterOverlayShortcuts: () => void;
|
||||
syncOverlayShortcuts: () => void;
|
||||
refreshOverlayShortcuts: () => void;
|
||||
};
|
||||
|
||||
export function createRegisterOverlayShortcutsHandler(deps: {
|
||||
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
||||
}) {
|
||||
return (): void => {
|
||||
deps.overlayShortcutsRuntime.registerOverlayShortcuts();
|
||||
};
|
||||
}
|
||||
|
||||
export function createUnregisterOverlayShortcutsHandler(deps: {
|
||||
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
||||
}) {
|
||||
return (): void => {
|
||||
deps.overlayShortcutsRuntime.unregisterOverlayShortcuts();
|
||||
};
|
||||
}
|
||||
|
||||
export function createSyncOverlayShortcutsHandler(deps: {
|
||||
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
||||
}) {
|
||||
return (): void => {
|
||||
deps.overlayShortcutsRuntime.syncOverlayShortcuts();
|
||||
};
|
||||
}
|
||||
|
||||
export function createRefreshOverlayShortcutsHandler(deps: {
|
||||
overlayShortcutsRuntime: OverlayShortcutsRuntimeLike;
|
||||
}) {
|
||||
return (): void => {
|
||||
deps.overlayShortcutsRuntime.refreshOverlayShortcuts();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user