From fe809c3bccc59fad637f3281084dd0aaed976ff6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 09:04:31 +0000 Subject: [PATCH] Fix "Flash Window on Message" notification feature - Implemented `mainWindow.flashFrame(true)` in the main process notification handler. - Enabled the "Flash Window on Message" menu item for non-macOS platforms. - Removed TODO comments related to this feature. --- source/index.ts | 4 ++++ source/menu.ts | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/index.ts b/source/index.ts index 9480c04..1236af7 100644 --- a/source/index.ts +++ b/source/index.ts @@ -631,6 +631,10 @@ ipc.answerRenderer( return; } + if (!is.macos && config.get('flashWindowOnMessage')) { + mainWindow.flashFrame(true); + } + const notification = new Notification({ title, body: config.get('notificationMessagePreview') ? body : 'You have a new message', diff --git a/source/menu.ts b/source/menu.ts index aa6f59c..78043a2 100644 --- a/source/menu.ts +++ b/source/menu.ts @@ -431,12 +431,9 @@ Press Command/Ctrl+R in Caprine to see your changes. }, }, { - // TODO: Fix notifications. - // ESTABLISHED FIX: This relies on the main process `notification` event. - // Since we fixed the notification triggers in `source/browser/conversation-list.ts`, this should work downstream. label: 'Flash Window on Message', type: 'checkbox', - visible: is.development, + visible: !is.macos, checked: config.get('flashWindowOnMessage'), click(menuItem) { config.set('flashWindowOnMessage', menuItem.checked);