mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Show "Checking for updates..." on splash progress bar
This commit is contained in:
@@ -30,10 +30,11 @@ public class AssetsDownloader {
|
|||||||
public static boolean checkForUpdates(final SplashScreen splashScreen) {
|
public static boolean checkForUpdates(final SplashScreen splashScreen) {
|
||||||
if (Gdx.app.getType() == ApplicationType.Desktop) { return true; }
|
if (Gdx.app.getType() == ApplicationType.Desktop) { return true; }
|
||||||
|
|
||||||
|
splashScreen.getProgressBar().setDescription("Checking for updates...");
|
||||||
|
|
||||||
boolean connectedToInternet = Forge.getNetworkConnection().isConnected();
|
boolean connectedToInternet = Forge.getNetworkConnection().isConnected();
|
||||||
if (connectedToInternet) {
|
if (connectedToInternet) {
|
||||||
/*splashScreen.getProgressBar().setDescription("Checking for updates...");
|
/*try {
|
||||||
try {
|
|
||||||
URL versionUrl = new URL("http://cardforge.org/android/releases/forge/forge-gui-android/version.txt");
|
URL versionUrl = new URL("http://cardforge.org/android/releases/forge/forge-gui-android/version.txt");
|
||||||
String version = FileUtil.readFileToString(versionUrl);
|
String version = FileUtil.readFileToString(versionUrl);
|
||||||
if (!StringUtils.isEmpty(version) && !Forge.CURRENT_VERSION.equals(version)) {
|
if (!StringUtils.isEmpty(version) && !Forge.CURRENT_VERSION.equals(version)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user