1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-27 07:44:20 +02:00

Merge pull request #1805 from cyian-1756/tray-icon-fix

Fixed issue which caused ripme to fail to rip more than 1 url when running in the background
This commit is contained in:
cyian-1756
2020-11-26 00:26:33 +00:00
committed by GitHub

View File

@@ -1279,11 +1279,15 @@ public final class MainWindow implements Runnable, RipStatusHandler {
ripper.setObserver(this);
Thread t = new Thread(ripper);
if (configShowPopup.isSelected() && (!mainFrame.isVisible() || !mainFrame.isActive())) {
mainFrame.toFront();
mainFrame.setAlwaysOnTop(true);
trayIcon.displayMessage(mainFrame.getTitle(), "Started ripping " + ripper.getURL().toExternalForm(),
MessageType.INFO);
mainFrame.setAlwaysOnTop(false);
try {
mainFrame.toFront();
mainFrame.setAlwaysOnTop(true);
trayIcon.displayMessage(mainFrame.getTitle(), "Started ripping " + ripper.getURL().toExternalForm(),
MessageType.INFO);
mainFrame.setAlwaysOnTop(false);
} catch (NullPointerException e) {
LOGGER.error("Could not send popup, are tray icons supported?");
}
}
return t;
} catch (Exception e) {