Feat: add static analytic of code

This commit is contained in:
Laurent Clouet
2024-06-03 14:02:30 +00:00
parent c966a1a032
commit 4bce6409e3
52 changed files with 249 additions and 316 deletions

View File

@@ -136,7 +136,6 @@ public class GuiSwing extends JFrame implements Gui {
private DownloadProgress downloadProgress;
private BufferedImage iconSprites;
private BufferedImage[] trayIconSprites;
@Getter @Setter private SettingsLoader settingsLoader;
@@ -183,7 +182,6 @@ public class GuiSwing extends JFrame implements Gui {
if (spriteSequenceUrl != null) {
try {
iconSprites = ImageIO.read(spriteSequenceUrl);
trayIconSprites = new BufferedImage[101 * 1]; // sprite sheet has 101 images in 1 column
setIconImage(extractImageFromSprite(-1)); // sprite 0 is standard Sheep It! icon
}
@@ -483,12 +481,10 @@ public class GuiSwing extends JFrame implements Gui {
setIconImage(img);
// if the app supports the system tray, update as well
if (sysTray != null && SystemTray.isSupported()) {
if (trayIcon != null) {
trayIcon.setImage(img);
trayIcon.setImageAutoSize(true); // use this method to ensure that icon is refreshed when on
// the tray
}
if (sysTray != null && SystemTray.isSupported() && trayIcon != null) {
trayIcon.setImage(img);
trayIcon.setImageAutoSize(true); // use this method to ensure that icon is refreshed when on
// the tray
}
}