[FEATURE] Alert of new version

Related to issue #195
This commit is contained in:
Emma Stone
2017-05-31 03:15:43 +01:00
parent 85c00e8880
commit d6547e3b84
3 changed files with 38 additions and 26 deletions
+4 -6
View File
@@ -1,7 +1,6 @@
package org.parabot;
import org.parabot.api.translations.TranslationHelper;
import org.parabot.core.Configuration;
import org.parabot.core.Core;
import org.parabot.core.Directories;
import org.parabot.core.forum.AccountManager;
@@ -10,13 +9,10 @@ import org.parabot.core.network.proxy.ProxySocket;
import org.parabot.core.network.proxy.ProxyType;
import org.parabot.core.ui.BotUI;
import org.parabot.core.ui.ServerSelector;
import org.parabot.core.ui.utils.UILog;
import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.net.URI;
/**
* Parabot v2.6
@@ -46,8 +42,10 @@ public final class Landing {
}
if (!Core.inDebugMode() && Core.hasValidation() && !Core.isValid()) {
Core.downloadNewVersion();
return;
if (Core.newVersionAlert() == JOptionPane.YES_OPTION) {
Core.downloadNewVersion();
return;
}
}
Core.verbose(TranslationHelper.translate("VALIDATION_ACCOUNT_MANAGER"));