mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 17:49:19 +00:00
lint
This commit is contained in:
+21
-15
@@ -12,23 +12,29 @@ import { randomArray } from "./utils.js";
|
|||||||
import { getDisplayMediaCallback, setDisplayMediaCallback } from "./displayMediaCallback.js";
|
import { getDisplayMediaCallback, setDisplayMediaCallback } from "./displayMediaCallback.js";
|
||||||
import Store, { clearDataAndRelaunch } from "./store.js";
|
import Store, { clearDataAndRelaunch } from "./store.js";
|
||||||
|
|
||||||
ipcMain.on("setBadgeCount", function (_ev: IpcMainEvent, count: number, imageBuffer?: Buffer, imageBufferDescription?: string): void {
|
ipcMain.on(
|
||||||
if (process.platform !== "win32") {
|
"setBadgeCount",
|
||||||
// only set badgeCount on Mac/Linux, the docs say that only those platforms support it but turns out Electron
|
function (_ev: IpcMainEvent, count: number, imageBuffer?: Buffer, imageBufferDescription?: string): void {
|
||||||
// has some Windows support too, and in some Windows environments this leads to two badges rendering atop
|
if (process.platform !== "win32") {
|
||||||
// each other. See https://github.com/vector-im/element-web/issues/16942
|
// only set badgeCount on Mac/Linux, the docs say that only those platforms support it but turns out Electron
|
||||||
app.badgeCount = count;
|
// has some Windows support too, and in some Windows environments this leads to two badges rendering atop
|
||||||
} else {
|
// each other. See https://github.com/vector-im/element-web/issues/16942
|
||||||
if (imageBuffer && imageBufferDescription !== undefined) {
|
app.badgeCount = count;
|
||||||
global.mainWindow?.setOverlayIcon(nativeImage.createFromBuffer(Buffer.from(imageBuffer)), imageBufferDescription);
|
|
||||||
} else {
|
} else {
|
||||||
global.mainWindow?.setOverlayIcon(null, "");
|
if (imageBuffer && imageBufferDescription !== undefined) {
|
||||||
|
global.mainWindow?.setOverlayIcon(
|
||||||
|
nativeImage.createFromBuffer(Buffer.from(imageBuffer)),
|
||||||
|
imageBufferDescription,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
global.mainWindow?.setOverlayIcon(null, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (count === 0) {
|
||||||
if (count === 0) {
|
global.mainWindow?.flashFrame(false);
|
||||||
global.mainWindow?.flashFrame(false);
|
}
|
||||||
}
|
},
|
||||||
});
|
);
|
||||||
|
|
||||||
let focusHandlerAttached = false;
|
let focusHandlerAttached = false;
|
||||||
ipcMain.on("loudNotification", function (): void {
|
ipcMain.on("loudNotification", function (): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user