aboutsummaryrefslogtreecommitdiffstats
path: root/src/electron
diff options
context:
space:
mode:
Diffstat (limited to 'src/electron')
-rw-r--r--src/electron/ipc-api/dnd.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/electron/ipc-api/dnd.ts b/src/electron/ipc-api/dnd.ts
index d8958d9b0..bf41d360b 100644
--- a/src/electron/ipc-api/dnd.ts
+++ b/src/electron/ipc-api/dnd.ts
@@ -1,7 +1,8 @@
1import { ipcMain } from 'electron'; 1import { ipcMain } from 'electron';
2import doNotDisturb from '@sindresorhus/do-not-disturb';
3import { isMac } from '../../environment'; 2import { isMac } from '../../environment';
4 3
4const { getDoNotDisturb } = require('macos-notification-state');
5
5const debug = require('debug')('Ferdi:ipcApi:dnd'); 6const debug = require('debug')('Ferdi:ipcApi:dnd');
6 7
7export default async () => { 8export default async () => {
@@ -11,7 +12,7 @@ export default async () => {
11 } 12 }
12 13
13 try { 14 try {
14 const isDND = await doNotDisturb.isEnabled(); 15 const isDND = getDoNotDisturb();
15 debug('Fetching DND state, set to', isDND); 16 debug('Fetching DND state, set to', isDND);
16 return isDND; 17 return isDND;
17 } catch (error) { 18 } catch (error) {