mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Ability to stop auto update
This commit is contained in:
committed by
Junyoung Choi
parent
7d4d176bf4
commit
d78f6b7aba
@@ -8,6 +8,7 @@ const win = global.process.platform === 'win32'
|
||||
const electron = require('electron')
|
||||
const { ipcRenderer } = electron
|
||||
const consts = require('browser/lib/consts')
|
||||
const electronConfig = new (require('electron-config'))()
|
||||
|
||||
let isInitialized = false
|
||||
|
||||
@@ -26,6 +27,7 @@ export const DEFAULT_CONFIG = {
|
||||
sortTagsBy: 'ALPHABETICAL', // 'ALPHABETICAL', 'COUNTER'
|
||||
listStyle: 'DEFAULT', // 'DEFAULT', 'SMALL'
|
||||
amaEnabled: true,
|
||||
autoUpdateEnabled: true,
|
||||
hotkey: {
|
||||
toggleMain: OSX ? 'Command + Alt + L' : 'Super + Alt + E',
|
||||
toggleMode: OSX ? 'Command + Alt + M' : 'Ctrl + M',
|
||||
@@ -141,6 +143,8 @@ function get () {
|
||||
_save(config)
|
||||
}
|
||||
|
||||
config.autoUpdateEnabled = electronConfig.get('autoUpdateEnabled', config.autoUpdateEnabled)
|
||||
|
||||
if (!isInitialized) {
|
||||
isInitialized = true
|
||||
let editorTheme = document.getElementById('editorTheme')
|
||||
@@ -205,6 +209,8 @@ function set (updates) {
|
||||
editorTheme.setAttribute('href', newTheme.path)
|
||||
}
|
||||
|
||||
electronConfig.set('autoUpdateEnabled', newConfig.autoUpdateEnabled)
|
||||
|
||||
ipcRenderer.send('config-renew', {
|
||||
config: get()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user