Commit 720e79f7 authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Update popup bug

Do not show update popup if no update available
parent 1fe6ad3e
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.utc.simde.jessy"
android:versionCode="24"
android:versionName="0.9">
android:versionCode="25"
android:versionName="0.9.1">
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.INTERNET" />
......
......@@ -614,15 +614,8 @@ public abstract class BaseActivity extends InternetActivity {
}
});
}
else if (popupIfNot)
throw new Exception(getString(R.string.no_update));
else
runOnUiThread(new Runnable() {
@Override
public void run() {
dialog.stopLoading();
}
});
throw new Exception(getString(R.string.no_update));
}
else
throw new Exception(getString(R.string.can_not_detect_update));
......@@ -633,7 +626,9 @@ public abstract class BaseActivity extends InternetActivity {
@Override
public void run() {
dialog.stopLoading();
dialog.errorDialog(BaseActivity.this, getString(R.string.update), e.getMessage() + "\n" + getString(R.string.actual_version) + ": " + BuildConfig.VERSION_NAME);
if (popupIfNot)
dialog.errorDialog(BaseActivity.this, getString(R.string.update), e.getMessage() + "\n" + getString(R.string.actual_version) + ": " + BuildConfig.VERSION_NAME);
}
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment