Skip to content

Commit 7886765

Browse files
committed
feat: recreate the tray icon
1 parent 99c3822 commit 7886765

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/codedead/opal/controller/SettingsWindowController.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ private void saveSettingsAction() {
223223
mainWindowController.loadMediaButtonVisibility(chbMediaButtons.isSelected());
224224
if (chbTrayIcon.isSelected()) {
225225
try {
226-
trayIconController.showTrayIcon();
226+
trayIconController.hideTrayIcon(); // Destroy the old tray icon
227+
trayIconController.showTrayIcon(); // Create a new tray icon (needed for the new settings - language)
227228
} catch (final IOException ex) {
228229
logger.error("Unable to create tray icon", ex);
229230
FxUtils.showErrorAlert(translationBundle.getString("TrayIconError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));

0 commit comments

Comments
 (0)