Skip to content

Commit

Permalink
优化桌面提醒
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Dec 23, 2019
1 parent 8414c1c commit d6a69bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions app/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ const path = require("path")

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

let { Notification } = require("electron")
if (typeof Notification == "undefined") {
Notification = require("electron").remote.Notification
}
const { Notification } = require("electron")

/**
* @param {string} title
Expand Down
3 changes: 2 additions & 1 deletion app/plugins/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

// @ts-check

const notify = require("../notify.js")
/** @type {import("../notify")} */
const notify = require("electron").remote.require("./notify.js")

/**
* @typedef {import("./index").Plugin} Plugin
Expand Down

0 comments on commit d6a69bd

Please sign in to comment.