aboutsummaryrefslogtreecommitdiffstats
path: root/src/electron/ipc-api/dnd.js
diff options
context:
space:
mode:
authorLibravatar Amine El Mouafik <412895+kytwb@users.noreply.github.com>2021-02-08 10:34:45 +0100
committerLibravatar GitHub <noreply@github.com>2021-02-08 10:34:45 +0100
commit035002ceedf78d5ec73eabc0df7f06139939b967 (patch)
tree1c0d1e9531bae05fb65d70b9ea25baf404b74fe1 /src/electron/ipc-api/dnd.js
parentdocs: add k0staa as a contributor (#1193) (diff)
downloadferdium-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.js16
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 @@
1import { ipcMain } from 'electron';
2import { getDoNotDisturb } from '@meetfranz/electron-notification-state';
3
4const debug = require('debug')('Franz:ipcApi:dnd');
5
6export 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};