diff options
author | 2021-02-08 10:34:45 +0100 | |
---|---|---|
committer | 2021-02-08 10:34:45 +0100 | |
commit | 035002ceedf78d5ec73eabc0df7f06139939b967 (patch) | |
tree | 1c0d1e9531bae05fb65d70b9ea25baf404b74fe1 /src/electron/ipc-api/dnd.js | |
parent | docs: add k0staa as a contributor (#1193) (diff) | |
download | ferdium-app-035002ceedf78d5ec73eabc0df7f06139939b967.tar.gz ferdium-app-035002ceedf78d5ec73eabc0df7f06139939b967.tar.zst ferdium-app-035002ceedf78d5ec73eabc0df7f06139939b967.zip |
Synchronize with Franz 5.6.0 (#1033)
Co-authored-by: FranzBot <i18n@meetfranz.com>
Co-authored-by: vantezzen <hello@vantezzen.io>
Co-authored-by: Makazzz <makazzzpro@live.ca>
Co-authored-by: Stefan Malzner <stefan@adlk.io>
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'src/electron/ipc-api/dnd.js')
-rw-r--r-- | src/electron/ipc-api/dnd.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/electron/ipc-api/dnd.js b/src/electron/ipc-api/dnd.js new file mode 100644 index 000000000..4589aa222 --- /dev/null +++ b/src/electron/ipc-api/dnd.js | |||
@@ -0,0 +1,16 @@ | |||
1 | import { ipcMain } from 'electron'; | ||
2 | import { getDoNotDisturb } from '@meetfranz/electron-notification-state'; | ||
3 | |||
4 | const debug = require('debug')('Franz:ipcApi:dnd'); | ||
5 | |||
6 | export default async () => { | ||
7 | ipcMain.handle('get-dnd', async () => { | ||
8 | try { | ||
9 | const isDND = getDoNotDisturb(); | ||
10 | debug('Fetching DND state, set to', isDND); | ||
11 | return isDND; | ||
12 | } catch (e) { | ||
13 | console.error(e); | ||
14 | } | ||
15 | }); | ||
16 | }; | ||