Add splash/tray image customisation & change default splash (#1179)

This commit is contained in:
V
2025-10-05 18:14:13 +00:00
committed by GitHub
parent e79635f15e
commit a55b1f0250
19 changed files with 400 additions and 114 deletions
+8
View File
@@ -8,6 +8,8 @@ import { app, NativeImage, nativeImage } from "electron";
import { join } from "path";
import { BADGE_DIR } from "shared/paths";
import { AppEvents } from "./events";
const imgCache = new Map<number, NativeImage>();
function loadBadge(index: number) {
const cached = imgCache.get(index);
@@ -21,7 +23,13 @@ function loadBadge(index: number) {
let lastIndex: null | number = -1;
/**
* -1 = show unread indicator
* 0 = clear
*/
export function setBadgeCount(count: number) {
AppEvents.emit("setTrayVariant", count !== 0 ? "trayUnread" : "tray");
switch (process.platform) {
case "linux":
if (count === -1) count = 0;