mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-03 03:28:13 -05:00
18 lines
409 B
TypeScript
18 lines
409 B
TypeScript
import db from '~/main/apis/core/datastore'
|
|
import { autoUpdater } from 'electron-updater'
|
|
|
|
const updateChecker = async () => {
|
|
let showTip = db.get('settings.showUpdateTip')
|
|
if (showTip === undefined) {
|
|
db.set('settings.showUpdateTip', true)
|
|
showTip = true
|
|
}
|
|
if (showTip) {
|
|
try {
|
|
await autoUpdater.checkForUpdatesAndNotify()
|
|
} catch (err) {}
|
|
}
|
|
}
|
|
|
|
export default updateChecker
|