diff --git a/app/src/main/assets/changelog.json b/app/src/main/assets/changelog.json index a28f2aff..7fe1526f 100644 --- a/app/src/main/assets/changelog.json +++ b/app/src/main/assets/changelog.json @@ -1,9 +1,9 @@ { "changelogs": [ { - "version_code": 13, - "version": "5.0.0", - "release_date": "Someday in september.... hopefully", + "version_code": 14, + "version": "1.5.0", + "release_date": "Someday in October.... hopefully", "video": "Maybe someday", "prelude": "May be useful sometimes.. like a text above the actual change list", "change_list": [ @@ -49,12 +49,12 @@ },{ "change": "bug", "title": "Many bugs.", - "description": "We fixed a ton of other bugs, so the app is now like 36.2% more bug free." + "description": "We fixed a ton of other bugs, so the app is now like 36.21% more bug free." }, { "change": "improvement", - "title": "Much cutter icons in boards.", - "description": "Sticky icon changed to much the overall greatness of the forum, also a dot was added. Don't you just love dots?" + "title": "Much cuter icons in boards.", + "description": "Sticky icon changed to match the overall greatness of the forum, also a dot was added. Don't you just love dots?" }, { "change": "improvement", diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java index 4fdc4543..0e25a92f 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java @@ -101,7 +101,8 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF if (Changelog.getLaunchType(this) == Changelog.LAUNCH_TYPE.FIRST_LAUNCH_AFTER_UPDATE) { AlertDialog dialog = Changelog.getChangelogDialog(this); - dialog.show(); + if(dialog!=null) + dialog.show(); } } diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/Changelog.java b/app/src/main/java/gr/thmmy/mthmmy/utils/Changelog.java index ae3d7615..744395b8 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/Changelog.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/Changelog.java @@ -69,6 +69,7 @@ public class Changelog { JSONObject jsonObject = new JSONObject(loadJSONFromAssets(context)); JSONArray jsonArray = jsonObject.getJSONArray("changelogs"); + boolean currentVersionFound = false; for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObjectInner = jsonArray.getJSONObject(i); int versionCode = jsonObjectInner.getInt("version_code"); @@ -125,9 +126,12 @@ public class Changelog { changeText.setText(spannable); changeListView.addView(changeText); } + currentVersionFound = true; break; } } + if(!currentVersionFound) + return null; } catch (JSONException exception) { Timber.e(exception, "Couldn't read changelog json from assets"); }