Use require(...) instead of import ordering for appBadge

This commit is contained in:
Albert Zhang 2023-12-27 20:43:31 -05:00
parent 7db8ecab18
commit 2e155c3217
No known key found for this signature in database
GPG key ID: D74C859E94CA6DDC
2 changed files with 2 additions and 4 deletions

View file

@ -53,7 +53,7 @@ async function copyVenmic() {
async function composeTrayIconsIfSupported() { async function composeTrayIconsIfSupported() {
if (process.platform === "darwin") return; if (process.platform === "darwin") return;
await composeTrayIcons({ return composeTrayIcons({
icon: "./static/icon.png", icon: "./static/icon.png",
badgeDir: "./static/badges/", badgeDir: "./static/badges/",
outDir: "./static/dist/tray_icons", outDir: "./static/dist/tray_icons",

View file

@ -15,8 +15,6 @@ import { join } from "path";
import { debounce } from "shared/utils/debounce"; import { debounce } from "shared/utils/debounce";
import { IpcEvents } from "../shared/IpcEvents"; import { IpcEvents } from "../shared/IpcEvents";
// !!IMPORTANT!! ./appBadge import must occur after ./mainWindow
import { setBadgeCount } from "./appBadge";
import { autoStart } from "./autoStart"; import { autoStart } from "./autoStart";
import { VENCORD_FILES_DIR, VENCORD_QUICKCSS_FILE, VENCORD_THEMES_DIR } from "./constants"; import { VENCORD_FILES_DIR, VENCORD_QUICKCSS_FILE, VENCORD_THEMES_DIR } from "./constants";
import { globals } from "./mainWindow"; import { globals } from "./mainWindow";
@ -123,7 +121,7 @@ handle(IpcEvents.SELECT_VENCORD_DIR, async () => {
}); });
handle(IpcEvents.SET_BADGE_COUNT, (_, count: number) => { handle(IpcEvents.SET_BADGE_COUNT, (_, count: number) => {
setBadgeCount(count); (require("./appBadge") as typeof import("./appBadge")).setBadgeCount(count);
}); });
function readCss() { function readCss() {