mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-23 21:55:09 +00:00
fix: show custom icon on startup initially
This commit is contained in:
parent
a014cf55b9
commit
0571807ff3
1 changed files with 7 additions and 4 deletions
|
@ -18,10 +18,11 @@ import {
|
||||||
systemPreferences,
|
systemPreferences,
|
||||||
Tray
|
Tray
|
||||||
} from "electron";
|
} from "electron";
|
||||||
|
import { existsSync } from "fs";
|
||||||
import { rm } from "fs/promises";
|
import { rm } from "fs/promises";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { IpcEvents } from "shared/IpcEvents";
|
import { IpcEvents } from "shared/IpcEvents";
|
||||||
import { ICON_PATH } from "shared/paths";
|
import { ICON_PATH, ICONS_DIR } from "shared/paths";
|
||||||
import { isTruthy } from "shared/utils/guards";
|
import { isTruthy } from "shared/utils/guards";
|
||||||
import { once } from "shared/utils/once";
|
import { once } from "shared/utils/once";
|
||||||
import type { SettingsStore } from "shared/utils/SettingsStore";
|
import type { SettingsStore } from "shared/utils/SettingsStore";
|
||||||
|
@ -40,7 +41,6 @@ import {
|
||||||
} from "./constants";
|
} from "./constants";
|
||||||
import { Settings, State, VencordSettings } from "./settings";
|
import { Settings, State, VencordSettings } from "./settings";
|
||||||
import { createSplashWindow } from "./splash";
|
import { createSplashWindow } from "./splash";
|
||||||
import { setTrayIcon } from "./tray";
|
|
||||||
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
||||||
import { applyDeckKeyboardFix, askToApplySteamLayout, isDeckGameMode } from "./utils/steamOS";
|
import { applyDeckKeyboardFix, askToApplySteamLayout, isDeckGameMode } from "./utils/steamOS";
|
||||||
import { downloadVencordFiles, ensureVencordFiles } from "./utils/vencordLoader";
|
import { downloadVencordFiles, ensureVencordFiles } from "./utils/vencordLoader";
|
||||||
|
@ -126,8 +126,11 @@ function initTray(win: BrowserWindow) {
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
tray = new Tray(ICON_PATH);
|
if (Settings.store.trayMainOverride && existsSync(join(ICONS_DIR, "icon_custom.png"))) {
|
||||||
setTrayIcon("icon");
|
tray = new Tray(join(ICONS_DIR, "icon_custom.png"));
|
||||||
|
} else {
|
||||||
|
tray = new Tray(ICON_PATH);
|
||||||
|
}
|
||||||
tray.setToolTip("Vesktop");
|
tray.setToolTip("Vesktop");
|
||||||
tray.setContextMenu(trayMenu);
|
tray.setContextMenu(trayMenu);
|
||||||
tray.on("click", onTrayClick);
|
tray.on("click", onTrayClick);
|
||||||
|
|
Loading…
Add table
Reference in a new issue