[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:
Tasos Boulis
2022-11-14 21:40:18 +02:00
committed by GitHub
parent 4171774aee
commit e1f5250c0c
7 changed files with 208 additions and 7 deletions

View File

@@ -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(),

View File

@@ -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);
}