Browse Source

Update UpdateChecker.java

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
committed by GitHub
parent
commit
43f77409ba
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/awais/instagrabber/utils/UpdateChecker.java

4
app/src/main/java/awais/instagrabber/utils/UpdateChecker.java

@ -37,7 +37,7 @@ public final class UpdateChecker extends AsyncTask<Void, Void, Boolean> {
if (responseCode == HttpURLConnection.HTTP_OK) { if (responseCode == HttpURLConnection.HTTP_OK) {
final JSONObject data = new JSONObject(Utils.readFromConnection(conn)); final JSONObject data = new JSONObject(Utils.readFromConnection(conn));
if (BuildConfig.VERSION_CODE < data.getInt("suggestedVersionCode")) { if (BuildConfig.VERSION_CODE < data.getInt("suggestedVersionCode")) {
version = data.getJSONArray("packages").getString("versionName");
version = data.getJSONArray("packages").getJSONObject(0).getString("versionName");
return true; return true;
} }
} }
@ -55,4 +55,4 @@ public final class UpdateChecker extends AsyncTask<Void, Void, Boolean> {
if (result != null && result && fetchListener != null) if (result != null && result && fetchListener != null)
fetchListener.onResult("v"+version); fetchListener.onResult("v"+version);
} }
}
}
Loading…
Cancel
Save