refactor(server/utils): isMac/isWin - replace fn with boolean

those values cannot change during runtime,
=> there is no need to have these checks
as dynamic function, instead just
export the boolean value directly
This commit is contained in:
Panagiotis Papadopoulos
2025-01-22 18:42:42 +01:00
parent 7c28b93477
commit 94411cf418
5 changed files with 8 additions and 11 deletions

View File

@@ -116,10 +116,10 @@ function getWindowExtraOpts() {
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
if (!optionService.getOptionBool("nativeTitleBarVisible")) {
if (isMac()) {
if (isMac) {
extraOpts.titleBarStyle = "hiddenInset";
extraOpts.titleBarOverlay = true;
} else if (isWindows()) {
} else if (isWindows) {
extraOpts.titleBarStyle = "hidden";
extraOpts.titleBarOverlay = true;
} else {
@@ -129,7 +129,7 @@ function getWindowExtraOpts() {
}
// Window effects (Mica)
if (optionService.getOptionBool("backgroundEffects") && isWindows()) {
if (optionService.getOptionBool("backgroundEffects") && isWindows) {
extraOpts.backgroundMaterial = "auto";
}