This commit is contained in:
Vanessa 2022-11-16 09:51:06 +08:00
parent c14392a5ae
commit 06c098f411
5 changed files with 48 additions and 52 deletions

View file

@ -349,12 +349,6 @@ const boot = () => {
}
event.preventDefault()
})
nativeTheme.on('updated', () => {
mainWindow.webContents.send('siyuan-update-theme', {
theme: nativeTheme.shouldUseDarkColors ? 'dark' : 'light',
init: false,
})
})
// 监听主题切换
ipcMain.on('siyuan-config-theme', (event, theme) => {
nativeTheme.themeSource = theme
@ -400,10 +394,6 @@ const boot = () => {
writeLog('exited ui')
})
ipcMain.on('siyuan-init', async () => {
mainWindow.webContents.send('siyuan-update-theme', {
theme: nativeTheme.shouldUseDarkColors ? 'dark' : 'light',
init: true,
})
await fetch(getServer() + '/api/system/uiproc?pid=' + process.pid,
{method: 'POST'})
})