diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-10-08 10:31:01 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-10-08 10:31:01 +0200 |
commit | 8e27d3a4b0f6b98e36bb7e3a7f5a6f7a9530d5af (patch) | |
tree | 1be01a425bd0d9899d991e823b673c678fcd4897 | |
parent | 9658f18a3b5b9f08c1fab21115adca459b05958c (diff) | |
download | chatroom-8e27d3a4b0f6b98e36bb7e3a7f5a6f7a9530d5af.tar.gz chatroom-8e27d3a4b0f6b98e36bb7e3a7f5a6f7a9530d5af.tar.bz2 chatroom-8e27d3a4b0f6b98e36bb7e3a7f5a6f7a9530d5af.zip |
Updated client/main.js (automated)
-rwxr-xr-x | client/main.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/main.js b/client/main.js index 7f1f709..f2bbe17 100755 --- a/client/main.js +++ b/client/main.js @@ -69,7 +69,7 @@ const createWindow = () => { if (!isNaN(parseInt(title.substring(20).split("]")[0]))) {
notifications = parseInt(title.substring(20).split("]")[0]).toString();
}
- } else if (title.startsWith("Equestria.dev Chat *")) {
+ } else if (title.startsWith("Chatroom *")) {
notifications = "ยท";
} else {
notifications = "";
@@ -80,8 +80,11 @@ const createWindow = () => { }
if (os.platform() === "darwin") app.dock.setBadge(notifications);
- if (os.platform() === "win32") mainWindow.setOverlayIcon(nativeImage.createFromPath('./overlay.png'), "You have new messages.");
- if (os.platform() === "linux") mainWindow.focus();
+
+ if (notifications.trim() !== "") {
+ if (os.platform() === "win32") mainWindow.setOverlayIcon(nativeImage.createFromPath('./overlay.png'), "You have new messages.");
+ if (os.platform() === "linux") mainWindow.focus();
+ }
});
}
|