Skip to content

Commit

Permalink
feat: recreate the tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDead committed Jan 20, 2025
1 parent 99c3822 commit 7886765
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ private void saveSettingsAction() {
mainWindowController.loadMediaButtonVisibility(chbMediaButtons.isSelected());
if (chbTrayIcon.isSelected()) {
try {
trayIconController.showTrayIcon();
trayIconController.hideTrayIcon(); // Destroy the old tray icon
trayIconController.showTrayIcon(); // Create a new tray icon (needed for the new settings - language)
} catch (final IOException ex) {
logger.error("Unable to create tray icon", ex);
FxUtils.showErrorAlert(translationBundle.getString("TrayIconError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));
Expand Down

0 comments on commit 7886765

Please sign in to comment.