mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-31 21:29:37 +08:00
🔨 Refactor: simplify some functions
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import db from '~/main/apis/core/datastore'
|
||||
import { autoUpdater } from 'electron-updater'
|
||||
|
||||
const checkVersion = async () => {
|
||||
const updateChecker = async () => {
|
||||
let showTip = db.get('settings.showUpdateTip')
|
||||
if (showTip === undefined) {
|
||||
db.set('settings.showUpdateTip', true)
|
||||
@@ -10,12 +10,8 @@ const checkVersion = async () => {
|
||||
if (showTip) {
|
||||
try {
|
||||
await autoUpdater.checkForUpdatesAndNotify()
|
||||
} catch (err) {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
} catch (err) {}
|
||||
}
|
||||
}
|
||||
|
||||
export default checkVersion
|
||||
export default updateChecker
|
||||
|
||||
Reference in New Issue
Block a user