From 2fab2cd79d3a8df86e812cf6b6dee8e9c403127d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E8=90=8C=E5=93=92=E8=B5=AB=E8=90=9D?= Date: Wed, 5 Apr 2023 23:14:20 +0800 Subject: [PATCH] :hammer: Refactor: remove old update checker --- src/main/apis/app/system/index.ts | 30 ------------------------------ src/main/lifeCycle/index.ts | 5 ++--- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/main/apis/app/system/index.ts b/src/main/apis/app/system/index.ts index d1e4e5a..d9c7ec9 100644 --- a/src/main/apis/app/system/index.ts +++ b/src/main/apis/app/system/index.ts @@ -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'), click () { @@ -125,16 +115,6 @@ export function createContextMenu () { // @ts-ignore 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'), 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'), click () { diff --git a/src/main/lifeCycle/index.ts b/src/main/lifeCycle/index.ts index fbd9a7c..ac4ee6d 100644 --- a/src/main/lifeCycle/index.ts +++ b/src/main/lifeCycle/index.ts @@ -28,7 +28,6 @@ import { createTray } from 'apis/app/system' import server from '~/main/server/index' -import updateChecker from '~/main/utils/updateChecker' import shortKeyHandler from 'apis/app/shortKey/shortKeyHandler' import { getUploadFiles } from '~/main/utils/handleArgv' import db, { GalleryDB } from '~/main/apis/core/datastore' @@ -100,7 +99,7 @@ autoUpdater.on('update-downloaded', () => { }) autoUpdater.on('error', (err) => { - dialog.showErrorBox('error', err.message) + console.log(err) }) class LifeCycle { @@ -152,7 +151,7 @@ class LifeCycle { } createTray() db.set('needReload', false) - updateChecker() + // updateChecker() autoUpdater.checkForUpdatesAndNotify() // 不需要阻塞 process.nextTick(() => {