summaryrefslogtreecommitdiff
path: root/client/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/main.js')
-rwxr-xr-xclient/main.js9
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();
+ }
});
}