[MM-48080] Update tray icon instantly when the settings change (#2376)
* Update wording and update tray icon instantly when the settings change * Add tests * Include new file
This commit is contained in:
@@ -41,7 +41,9 @@ jest.mock('main/AutoLauncher', () => ({
|
||||
jest.mock('main/badge', () => ({
|
||||
setUnreadBadgeSetting: jest.fn(),
|
||||
}));
|
||||
jest.mock('main/tray/tray', () => ({}));
|
||||
jest.mock('main/tray/tray', () => ({
|
||||
refreshTrayImages: jest.fn(),
|
||||
}));
|
||||
jest.mock('main/windows/windowManager', () => ({
|
||||
handleUpdateConfig: jest.fn(),
|
||||
sendToRenderer: jest.fn(),
|
||||
|
@@ -67,6 +67,10 @@ export function handleConfigUpdate(newConfig: CombinedConfig) {
|
||||
setLoggingLevel(newConfig.logLevel as LogLevel);
|
||||
|
||||
handleUpdateMenuEvent();
|
||||
if (newConfig.trayIconTheme) {
|
||||
refreshTrayImages(newConfig.trayIconTheme);
|
||||
}
|
||||
|
||||
ipcMain.emit(EMIT_CONFIGURATION, true, newConfig);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user