Browse Source

Minor fixes

changelog
Ezerous 6 years ago
parent
commit
b806612caa
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 12
      app/src/main/assets/changelog.json
  2. 1
      app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java
  3. 4
      app/src/main/java/gr/thmmy/mthmmy/utils/Changelog.java

12
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",

1
app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java

@ -101,6 +101,7 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF
if (Changelog.getLaunchType(this) == Changelog.LAUNCH_TYPE.FIRST_LAUNCH_AFTER_UPDATE) {
AlertDialog dialog = Changelog.getChangelogDialog(this);
if(dialog!=null)
dialog.show();
}
}

4
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");
}

Loading…
Cancel
Save