Remove redundant theme change event emission in main.js
This commit is contained in:
2
main.js
2
main.js
@@ -2199,7 +2199,6 @@ function buildTrayMenu() {
|
|||||||
store.set('skymode', theme === 'sky');
|
store.set('skymode', theme === 'sky');
|
||||||
BrowserWindow.getAllWindows().forEach(win => {
|
BrowserWindow.getAllWindows().forEach(win => {
|
||||||
win.webContents.send('theme-changed', theme);
|
win.webContents.send('theme-changed', theme);
|
||||||
win.webContents.send('skymode-changed', theme === 'sky');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// Legacy SkyMode handlers
|
// Legacy SkyMode handlers
|
||||||
@@ -2209,7 +2208,6 @@ function buildTrayMenu() {
|
|||||||
store.set('theme', theme);
|
store.set('theme', theme);
|
||||||
store.set('skymode', !!val);
|
store.set('skymode', !!val);
|
||||||
BrowserWindow.getAllWindows().forEach(win => {
|
BrowserWindow.getAllWindows().forEach(win => {
|
||||||
win.webContents.send('theme-changed', theme);
|
|
||||||
win.webContents.send('skymode-changed', !!val);
|
win.webContents.send('skymode-changed', !!val);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user