From 43f77409ba767ca1a3c64855d6bbeeea9a9926ba Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Tue, 8 Sep 2020 15:46:19 -0400 Subject: [PATCH] Update UpdateChecker.java --- app/src/main/java/awais/instagrabber/utils/UpdateChecker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/UpdateChecker.java b/app/src/main/java/awais/instagrabber/utils/UpdateChecker.java index 20c2cbf4..765d9e82 100755 --- a/app/src/main/java/awais/instagrabber/utils/UpdateChecker.java +++ b/app/src/main/java/awais/instagrabber/utils/UpdateChecker.java @@ -37,7 +37,7 @@ public final class UpdateChecker extends AsyncTask { if (responseCode == HttpURLConnection.HTTP_OK) { final JSONObject data = new JSONObject(Utils.readFromConnection(conn)); if (BuildConfig.VERSION_CODE < data.getInt("suggestedVersionCode")) { - version = data.getJSONArray("packages").getString("versionName"); + version = data.getJSONArray("packages").getJSONObject(0).getString("versionName"); return true; } } @@ -55,4 +55,4 @@ public final class UpdateChecker extends AsyncTask { if (result != null && result && fetchListener != null) fetchListener.onResult("v"+version); } -} \ No newline at end of file +}