refactor: inline identity composers (stats-startup, overlay-window)

composeStatsStartupRuntime was a no-op that returned its input.
composeOverlayWindowHandlers was a 1-line delegation.
Both removed in favor of direct usage.
This commit is contained in:
2026-03-28 10:33:09 -07:00
parent c6d349886e
commit 312cba6955
6 changed files with 4 additions and 108 deletions

View File

@@ -384,13 +384,12 @@ import {
composeIpcRuntimeHandlers,
composeJellyfinRuntimeHandlers,
composeMpvRuntimeHandlers,
composeOverlayWindowHandlers,
composeOverlayVisibilityRuntime,
composeShortcutRuntimes,
composeStatsStartupRuntime,
composeSubtitlePrefetchRuntime,
composeStartupLifecycleHandlers,
} from './main/runtime/composers';
import { createOverlayWindowRuntimeHandlers } from './main/runtime/overlay-window-runtime-handlers';
import { createStartupBootstrapRuntimeDeps } from './main/startup';
import { createAppLifecycleRuntimeRunner } from './main/startup-lifecycle';
import {
@@ -2955,7 +2954,7 @@ const ensureImmersionTrackerStarted = (): void => {
hasAttemptedImmersionTrackerStartup = true;
createImmersionTrackerStartup();
};
const statsStartupRuntime = composeStatsStartupRuntime({
const statsStartupRuntime = {
ensureStatsServerStarted: () => ensureStatsServerStarted(),
ensureBackgroundStatsServerStarted: () => ensureBackgroundStatsServerStarted(),
stopBackgroundStatsServer: () => stopBackgroundStatsServer(),
@@ -2967,7 +2966,7 @@ const statsStartupRuntime = composeStatsStartupRuntime({
appState.statsStartupInProgress = false;
}
},
});
} as const;
const runStatsCliCommand = createRunStatsCliCommandHandler({
getResolvedConfig: () => getResolvedConfig(),
@@ -4492,7 +4491,7 @@ if (isAnilistTrackingEnabled(getResolvedConfig())) {
}
void initializeDiscordPresenceService();
const { createMainWindow: createMainWindowHandler, createModalWindow: createModalWindowHandler } =
composeOverlayWindowHandlers<BrowserWindow>({
createOverlayWindowRuntimeHandlers<BrowserWindow>({
createOverlayWindowDeps: {
createOverlayWindowCore: (kind, options) => createOverlayWindowCore(kind, options),
isDev,