🔨 Refactor: remove old update checker

This commit is contained in:
萌萌哒赫萝 2023-04-05 23:14:20 +08:00
parent e39cac9f3b
commit 2fab2cd79d
2 changed files with 2 additions and 33 deletions

View File

@ -50,16 +50,6 @@ export function createMenu () {
} }
} }
}, },
// @ts-ignore
{
label: T('OPEN_UPDATE_HELPER'),
type: 'checkbox',
checked: db.get('settings.showUpdateTip'),
click () {
const value = db.get('settings.showUpdateTip')
db.set('settings.showUpdateTip', !value)
}
},
{ {
label: T('PRIVACY_AGREEMENT'), label: T('PRIVACY_AGREEMENT'),
click () { click () {
@ -125,16 +115,6 @@ export function createContextMenu () {
// @ts-ignore // @ts-ignore
submenu submenu
}, },
// @ts-ignore
{
label: T('OPEN_UPDATE_HELPER'),
type: 'checkbox',
checked: db.get('settings.showUpdateTip'),
click () {
const value = db.get('settings.showUpdateTip')
db.set('settings.showUpdateTip', !value)
}
},
{ {
label: T('PRIVACY_AGREEMENT'), label: T('PRIVACY_AGREEMENT'),
click () { click () {
@ -174,16 +154,6 @@ export function createContextMenu () {
} }
} }
}, },
// @ts-ignore
{
label: T('OPEN_UPDATE_HELPER'),
type: 'checkbox',
checked: db.get('settings.showUpdateTip'),
click () {
const value = db.get('settings.showUpdateTip')
db.set('settings.showUpdateTip', !value)
}
},
{ {
label: T('ABOUT'), label: T('ABOUT'),
click () { click () {

View File

@ -28,7 +28,6 @@ import {
createTray createTray
} from 'apis/app/system' } from 'apis/app/system'
import server from '~/main/server/index' import server from '~/main/server/index'
import updateChecker from '~/main/utils/updateChecker'
import shortKeyHandler from 'apis/app/shortKey/shortKeyHandler' import shortKeyHandler from 'apis/app/shortKey/shortKeyHandler'
import { getUploadFiles } from '~/main/utils/handleArgv' import { getUploadFiles } from '~/main/utils/handleArgv'
import db, { GalleryDB } from '~/main/apis/core/datastore' import db, { GalleryDB } from '~/main/apis/core/datastore'
@ -100,7 +99,7 @@ autoUpdater.on('update-downloaded', () => {
}) })
autoUpdater.on('error', (err) => { autoUpdater.on('error', (err) => {
dialog.showErrorBox('error', err.message) console.log(err)
}) })
class LifeCycle { class LifeCycle {
@ -152,7 +151,7 @@ class LifeCycle {
} }
createTray() createTray()
db.set('needReload', false) db.set('needReload', false)
updateChecker() // updateChecker()
autoUpdater.checkForUpdatesAndNotify() autoUpdater.checkForUpdatesAndNotify()
// 不需要阻塞 // 不需要阻塞
process.nextTick(() => { process.nextTick(() => {