Revert "added ability to change icon to unread"

This reverts commit 3ccb0c40fc5255aa9e86f84df62bd42cb2037e65.
This commit is contained in:
Oleh Polisan 2024-04-18 17:32:21 +03:00 committed by Oleh Polisan
parent c3d5dbd3aa
commit 61088233c1
5 changed files with 2 additions and 15 deletions

View file

@ -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;

View file

@ -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);
}

View file

@ -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");
}
});

View file

@ -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");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB