diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index a428a7cb..167e6822 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -21,7 +21,7 @@ import { isTruthy } from "shared/utils/guards"; import { once } from "shared/utils/once"; import type { SettingsStore } from "shared/utils/SettingsStore"; -import { DEAFENED_ICON_PATH, ICON_PATH, IDLE_ICON_PATH, MUTED_ICON_PATH, SPEAKING_ICON_PATH, UNREAD_ICON_PATH } from "shared/paths"; +import { DEAFENED_ICON_PATH, ICON_PATH, IDLE_ICON_PATH, MUTED_ICON_PATH, SPEAKING_ICON_PATH } from "../shared/paths"; import { createAboutWindow } from "./about"; import { initArRPC } from "./arrpc"; import { @@ -491,9 +491,6 @@ export async function setTrayIcon(iconName) { case "deafened": tray.setImage(DEAFENED_ICON_PATH); break; - case "unread": - tray.setImage(UNREAD_ICON_PATH); - break; case "idle": tray.setImage(IDLE_ICON_PATH); break; diff --git a/src/renderer/appBadge.ts b/src/renderer/appBadge.ts index 0ca10b22..b55d488b 100644 --- a/src/renderer/appBadge.ts +++ b/src/renderer/appBadge.ts @@ -8,7 +8,6 @@ import { filters, waitFor } from "@vencord/types/webpack"; import { RelationshipStore } from "@vencord/types/webpack/common"; import { Settings } from "./settings"; -import { isInVC } from "./patches/tray"; let GuildReadStateStore: any; let NotificationSettingsStore: any; @@ -24,12 +23,8 @@ export function setBadge() { let totalCount = mentionCount + pendingRequests; if (!totalCount && hasUnread && !disableUnreadBadge) totalCount = -1; + VesktopNative.app.setBadgeCount(totalCount); - if(totalCount > 0 && !isInVC) { - VesktopNative.app.setTrayIcon("unread"); - } else if (!isInVC) { - VesktopNative.app.setTrayIcon("main"); - } } catch (e) { console.error(e); } diff --git a/src/renderer/patches/tray.ts b/src/renderer/patches/tray.ts index 9bec183d..3288d6ac 100644 --- a/src/renderer/patches/tray.ts +++ b/src/renderer/patches/tray.ts @@ -10,8 +10,6 @@ import { FluxDispatcher, UserStore } from "@vencord/types/webpack/common"; const muteActions = findByPropsLazy("isSelfMute"); const deafActions = findByPropsLazy("isSelfDeaf"); -export var isInVC = false; - onceReady.then(() => { const userID = UserStore.getCurrentUser().id; @@ -51,7 +49,6 @@ onceReady.then(() => { FluxDispatcher.subscribe("RTC_CONNECTION_STATE", params => { if (params.state === "RTC_CONNECTED") { - isInVC = true; if (deafActions.isSelfDeaf()) { VesktopNative.app.setTrayIcon("deafened"); } else if (muteActions.isSelfMute()) { @@ -60,7 +57,6 @@ onceReady.then(() => { VesktopNative.app.setTrayIcon("idle"); } } else if (params.state === "RTC_DISCONNECTED") { - isInVC = false; VesktopNative.app.setTrayIcon("main"); } }); diff --git a/src/shared/paths.ts b/src/shared/paths.ts index 30cd23b8..8ef13902 100644 --- a/src/shared/paths.ts +++ b/src/shared/paths.ts @@ -14,4 +14,3 @@ export const SPEAKING_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "speaking.png export const MUTED_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "muted.png"); export const DEAFENED_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "deafened.png"); export const IDLE_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "idle.png"); -export const UNREAD_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "unread.png"); diff --git a/static/unread.png b/static/unread.png deleted file mode 100644 index 4bffa98b..00000000 Binary files a/static/unread.png and /dev/null differ