1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-27 12:46:22 +01:00

Fixed issue with update button always appearing.

This commit is contained in:
sk89q 2014-01-08 15:20:51 -08:00
parent 11725c93da
commit 1c3b0a2722

View File

@ -167,12 +167,14 @@ public class LauncherFrame extends JFrame {
} }
private void checkLauncherUpdate() { private void checkLauncherUpdate() {
ListenableFuture<URL> future = launcher.getExecutor().submit(new LauncherUpdateChecker(launcher)); ListenableFuture<URL> future = launcher.getExecutor().submit(new LauncherUpdateChecker(launcher));
Futures.addCallback(future, new FutureCallback<URL>() { Futures.addCallback(future, new FutureCallback<URL>() {
@Override @Override
public void onSuccess(URL result) { public void onSuccess(URL result) {
requestUpdate(result); if (result != null) {
requestUpdate(result);
}
} }
@Override @Override
@ -208,7 +210,6 @@ public class LauncherFrame extends JFrame {
ProgressDialog.showProgress(this, future, _("launcher.selfUpdatingTitle"), _("launcher.selfUpdatingStatus")); ProgressDialog.showProgress(this, future, _("launcher.selfUpdatingTitle"), _("launcher.selfUpdatingStatus"));
SwingHelper.addErrorDialogCallback(this, future); SwingHelper.addErrorDialogCallback(this, future);
} else { } else {
selfUpdateButton.setVisible(false); selfUpdateButton.setVisible(false);
} }