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"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.utc.simde.jessy" package="fr.utc.simde.jessy"
android:versionCode="24" android:versionCode="25"
android:versionName="0.9"> android:versionName="0.9.1">
<uses-permission android:name="android.permission.NFC" /> <uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
......
...@@ -614,15 +614,8 @@ public abstract class BaseActivity extends InternetActivity { ...@@ -614,15 +614,8 @@ public abstract class BaseActivity extends InternetActivity {
} }
}); });
} }
else if (popupIfNot)
throw new Exception(getString(R.string.no_update));
else else
runOnUiThread(new Runnable() { throw new Exception(getString(R.string.no_update));
@Override
public void run() {
dialog.stopLoading();
}
});
} }
else else
throw new Exception(getString(R.string.can_not_detect_update)); throw new Exception(getString(R.string.can_not_detect_update));
...@@ -633,7 +626,9 @@ public abstract class BaseActivity extends InternetActivity { ...@@ -633,7 +626,9 @@ public abstract class BaseActivity extends InternetActivity {
@Override @Override
public void run() { public void run() {
dialog.stopLoading(); 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);
} }
}); });
} }
......
Supports Markdown
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