Silent failure when StatusTrayIcon is not supported on a platform
This commit is contained in:
		| @@ -71,12 +71,17 @@ public class Startup { | ||||
| 					JOptionPane.WARNING_MESSAGE); | ||||
| 		} | ||||
| 		Settings.getInstance().setUsername(userName); | ||||
| 		 | ||||
|  | ||||
| 		EventQueue.invokeLater(() -> { | ||||
| 			try { | ||||
| 				ChatWindow chatWindow = new ChatWindow(client, localDB); | ||||
| 				new StatusTrayIcon(chatWindow).show(); | ||||
| 				chatWindow.setVisible(true); | ||||
|  | ||||
| 				try { | ||||
| 					new StatusTrayIcon(chatWindow).show(); | ||||
| 				} catch (EnvoyException e) { | ||||
| 					logger.warning("The StatusTrayIcon is not supported on this platform!"); | ||||
| 				} | ||||
| 			} catch (Exception e) { | ||||
| 				e.printStackTrace(); | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user