diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-05-08 12:16:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 14:16:11 +0200 |
commit | 272698ef9c885e76c0760d056193817a38345bd5 (patch) | |
tree | 7df98cf1811817c358f788469351a6a7d46525e9 /src | |
parent | 470db06d91e1d90466e5fa1064eae4bb7318c5ad (diff) | |
download | NotEnoughUpdates-272698ef9c885e76c0760d056193817a38345bd5.tar.gz NotEnoughUpdates-272698ef9c885e76c0760d056193817a38345bd5.tar.bz2 NotEnoughUpdates-272698ef9c885e76c0760d056193817a38345bd5.zip |
remove repo popup (#133)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index c283464e..b28aace6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -196,15 +196,7 @@ public class NEUManager { public CompletableFuture<Boolean> fetchRepository() { return CompletableFuture.<Boolean>supplyAsync(() -> { - JDialog dialog = null; try { - JOptionPane pane = new JOptionPane("Getting items to download from remote repository."); - dialog = pane.createDialog("NotEnoughUpdates Remote Sync"); - dialog.setModal(false); - if (NotEnoughUpdates.INSTANCE.config.hidden.dev) dialog.setVisible(true); - - if (Display.isActive()) dialog.toFront(); - JsonObject currentCommitJSON = getJsonFromFile(new File(configLocation, "currentCommit.json")); latestRepoCommit = null; @@ -221,19 +213,11 @@ public class NEUManager { return false; } } - - if (Display.isActive()) dialog.toFront(); - Utils.recursiveDelete(repoLocation); repoLocation.mkdirs(); String dlUrl = neu.config.hidden.repoURL; - pane.setMessage("Downloading NEU Master Archive. (DL# >20)"); - dialog.pack(); - if (NotEnoughUpdates.INSTANCE.config.hidden.dev) dialog.setVisible(true); - if (Display.isActive()) dialog.toFront(); - File itemsZip = new File(repoLocation, "neu-items-master.zip"); try { itemsZip.createNewFile(); @@ -249,16 +233,11 @@ public class NEUManager { try (InputStream is = urlConnection.getInputStream()) { FileUtils.copyInputStreamToFile(is, itemsZip); } catch (IOException e) { - dialog.dispose(); e.printStackTrace(); System.err.println("Failed to download NEU Repo! Please report this issue to the mod creator"); return false; } - pane.setMessage("Unzipping NEU Master Archive."); - dialog.pack(); - //dialog.setVisible(true); - if (Display.isActive()) dialog.toFront(); unzipIgnoreFirstFolder(itemsZip.getAbsolutePath(), repoLocation.getAbsolutePath()); @@ -272,8 +251,6 @@ public class NEUManager { } } catch (Exception e) { e.printStackTrace(); - } finally { - if (dialog != null) dialog.dispose(); } return true; }); |