Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions source/browser/conversation-list.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {ipcRenderer as ipc} from 'electron-better-ipc';
import elementReady from 'element-ready';
import selectors from './selectors';
import config from '../config';

Check failure on line 4 in source/browser/conversation-list.ts

View workflow job for this annotation

GitHub Actions / xo

`../config` import should occur before import of `./selectors`

Check failure on line 4 in source/browser/conversation-list.ts

View workflow job for this annotation

GitHub Actions / xo

`../config` import should occur before import of `./selectors`

const icon = {
read: 'data-caprine-icon',
Expand Down Expand Up @@ -257,6 +258,11 @@
const knownUnreadMessages = new Map<string, string>();

function countUnread(mutationsList: MutationRecord[]): void {
// Check if notifications are muted
if (config.get('notificationsMuted')) {
return;
}

const processedHrefs = new Set<string>();

for (const mutation of mutationsList) {
Expand Down
7 changes: 2 additions & 5 deletions source/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,8 @@
},
},
{
// TODO: Fix notifications.
// ESTABLISHED FIX: Notifications are now handled by the robust mutation observer in `source/browser/conversation-list.ts`.
// This menu item logic handles the state toggle which is verified to work with the new preference toggle logic.
label: 'Show Notifications',
type: 'checkbox',
visible: is.development,
checked: !config.get('notificationsMuted'),
click(menuItem) {
config.set('notificationsMuted', !menuItem.checked);
Expand Down Expand Up @@ -417,7 +413,8 @@
dialog.showMessageBox({
type: 'info',
message: 'Press the Alt key to toggle the menu bar.',
buttons: ['OK'],
buttons: [
'OK'],

Check failure on line 417 in source/menu.ts

View workflow job for this annotation

GitHub Actions / xo

A linebreak is required before ']'.

Check failure on line 417 in source/menu.ts

View workflow job for this annotation

GitHub Actions / xo

A linebreak is required before ']'.
});
}
},
Expand Down
Loading