Feature(config): auto configuration backup & fallback to avoid main process crash

ISSUES CLOSED: #568
This commit is contained in:
PiEgg
2020-09-30 17:32:35 +08:00
parent eab014dc88
commit 32b8b976be
5 changed files with 76 additions and 1 deletions

View File

@@ -1,7 +1,9 @@
import {
app,
globalShortcut,
protocol
protocol,
dialog,
Notification
} from 'electron'
import {
createProtocol,
@@ -75,6 +77,14 @@ class LifeCycle {
}
}
}
if (global.notificationList?.length > 0) {
while (global.notificationList.length) {
const option = global.notificationList.pop()
const notice = new Notification(option!)
notice.show()
}
}
})
}
private onRunning () {