mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-15 08:12:53 -07:00
24 lines
530 B
TypeScript
24 lines
530 B
TypeScript
import type { CliArgs } from '../../cli/args';
|
|
|
|
export function shouldEnsureTrayOnStartupForInitialArgs(
|
|
platform: NodeJS.Platform,
|
|
initialArgs: CliArgs | null,
|
|
): boolean {
|
|
if (platform !== 'win32') {
|
|
return false;
|
|
}
|
|
if (initialArgs?.youtubePlay) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
export function shouldQuitOnWindowAllClosedForTrayState(options: {
|
|
backgroundMode: boolean;
|
|
hasTray: boolean;
|
|
}): boolean {
|
|
if (options.backgroundMode) return false;
|
|
if (options.hasTray) return false;
|
|
return true;
|
|
}
|