diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/electron/ipc-api/dnd.ts | 5 |
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 @@ | |||
1 | import { ipcMain } from 'electron'; | 1 | import { ipcMain } from 'electron'; |
2 | import doNotDisturb from '@sindresorhus/do-not-disturb'; | ||
3 | import { isMac } from '../../environment'; | 2 | import { isMac } from '../../environment'; |
4 | 3 | ||
4 | const { getDoNotDisturb } = require('macos-notification-state'); | ||
5 | |||
5 | const debug = require('debug')('Ferdi:ipcApi:dnd'); | 6 | const debug = require('debug')('Ferdi:ipcApi:dnd'); |
6 | 7 | ||
7 | export default async () => { | 8 | export 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) { |