Skip to content

Commit d6a69bd

Browse files
committed
优化桌面提醒
1 parent 8414c1c commit d6a69bd

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/notify.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ const path = require("path")
44

55
const { notifier } = require("./native_node_modules")
66

7-
let { Notification } = require("electron")
8-
if (typeof Notification == "undefined") {
9-
Notification = require("electron").remote.Notification
10-
}
7+
const { Notification } = require("electron")
118

129
/**
1310
* @param {string} title

app/plugins/notification.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
// @ts-check
1313

14-
const notify = require("../notify.js")
14+
/** @type {import("../notify")} */
15+
const notify = require("electron").remote.require("./notify.js")
1516

1617
/**
1718
* @typedef {import("./index").Plugin} Plugin

0 commit comments

Comments
 (0)