aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-05-08 12:16:11 +0000
committerGitHub <noreply@github.com>2022-05-08 14:16:11 +0200
commit272698ef9c885e76c0760d056193817a38345bd5 (patch)
tree7df98cf1811817c358f788469351a6a7d46525e9 /src/main
parent470db06d91e1d90466e5fa1064eae4bb7318c5ad (diff)
downloadNotEnoughUpdates-272698ef9c885e76c0760d056193817a38345bd5.tar.gz
NotEnoughUpdates-272698ef9c885e76c0760d056193817a38345bd5.tar.bz2
NotEnoughUpdates-272698ef9c885e76c0760d056193817a38345bd5.zip
remove repo popup (#133)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java23
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;
});