fix: reset button

This commit is contained in:
Oleh Polisan 2024-06-21 17:45:24 +03:00
parent ccbb0945ff
commit b775af8086
2 changed files with 3 additions and 3 deletions

View file

@ -37,10 +37,8 @@ export async function setTrayIcon(iconName: string) {
if (iconName === "icon" && lastBadgeCount && lastBadgeCount > 0) { if (iconName === "icon" && lastBadgeCount && lastBadgeCount > 0) {
var trayImage: NativeImage; var trayImage: NativeImage;
if (isCustomIcon("icon")) { if (isCustomIcon("icon")) {
console.log("setting badge and CUSTOM icon");
trayImage = nativeImage.createFromPath(join(ICONS_DIR, "icon_custom.png")); trayImage = nativeImage.createFromPath(join(ICONS_DIR, "icon_custom.png"));
} else { } else {
console.log("setting badge and stock icon");
trayImage = nativeImage.createFromPath(join(ICONS_DIR, "icon.png")); trayImage = nativeImage.createFromPath(join(ICONS_DIR, "icon.png"));
} }

View file

@ -134,7 +134,9 @@ function TrayModalComponent({ modalProps, close }: { modalProps: any; close: ()
{Settings[key] && ( {Settings[key] && (
<Button <Button
onClick={() => { onClick={() => {
Settings.trayMainOverride = false; const iconKey =
statusToSettingsKey[iconName as keyof typeof statusToSettingsKey].key;
Settings[iconKey] = false;
setCurrentTrayIcon(); setCurrentTrayIcon();
}} }}
look={Button.Looks.LINK} look={Button.Looks.LINK}