mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 14:15:09 +00:00
Use require(...) instead of import ordering for appBadge
This commit is contained in:
parent
7db8ecab18
commit
2e155c3217
2 changed files with 2 additions and 4 deletions
|
@ -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",
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue