diff --git a/app/.meta/version.json b/app/.meta/version.json index 7931b9acc..af96fccf9 100644 --- a/app/.meta/version.json +++ b/app/.meta/version.json @@ -1,5 +1,5 @@ { - "code": 79, + "code": 80, "migration": false, "releaseNotes": "", "version": "1.1.0", diff --git a/app/app.iml b/app/app.iml index a4b943260..5245cddc4 100644 --- a/app/app.iml +++ b/app/app.iml @@ -119,6 +119,7 @@ + diff --git a/app/release/output.json b/app/release/output.json index 506a07f54..33a6c5f6c 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":79,"versionName":"1.1.0","enabled":true,"outputFile":"anitrend_v1.1.0_rc_79.apk","fullName":"release","baseName":"release"},"path":"anitrend_v1.1.0_rc_79.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":80,"versionName":"1.1.0","enabled":true,"outputFile":"anitrend_v1.1.0_rc_80.apk","fullName":"release","baseName":"release"},"path":"anitrend_v1.1.0_rc_80.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/assets/changelog.json b/app/src/main/assets/changelog.json deleted file mode 100644 index 3b0bd1a8d..000000000 --- a/app/src/main/assets/changelog.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "version": "1.0.1", - "level": 1, - "features": [{ - "featureType": 1, - "heading": "", - "summary": "" - }] - } -] \ No newline at end of file diff --git a/app/src/main/assets/changelog.md b/app/src/main/assets/changelog.md new file mode 100644 index 000000000..7ece322ff --- /dev/null +++ b/app/src/main/assets/changelog.md @@ -0,0 +1,14 @@ +### Enhancements +- Access privacy controls in __Settings__ and the privacy policy can be found: __Extras -> About__ +- Searching anime or manga lists from the anime/manga lists page +- Notifications sharing the same origin Id will marked as read as a whole +- Sharing media, posts, studios, character and staff links +- Revised media list manager dialog & added sorting media lists by title + +### Bug Fixes +- Improved notification unread indicator +- Media rank items applying invalid filters on media browse + +### Current Issues +- Clicking on @username shows mixed feed +- Emojis have been disabled. _New AniList site doesn't support them anymore_ \ No newline at end of file diff --git a/app/src/main/java/com/mxt/anitrend/util/ApplicationPref.java b/app/src/main/java/com/mxt/anitrend/util/ApplicationPref.java index e2119866e..31af17994 100644 --- a/app/src/main/java/com/mxt/anitrend/util/ApplicationPref.java +++ b/app/src/main/java/com/mxt/anitrend/util/ApplicationPref.java @@ -7,6 +7,7 @@ import android.support.annotation.Nullable; import android.support.annotation.StyleRes; +import com.mxt.anitrend.BuildConfig; import com.mxt.anitrend.R; /** @@ -19,6 +20,7 @@ public class ApplicationPref { private Context context; /** Base Application Values */ + private final String _versionCode = "_versionCode"; private final String _freshInstall = "_freshInstall"; private final String _isAuthenticated = "_isAuthenticated"; @@ -278,4 +280,14 @@ public void setUpdateChannel(@KeyUtil.Channel String channel) { editor.putString(_updateChannel, channel); editor.apply(); } + + public boolean isUpdated() { + return sharedPreferences.getInt(_versionCode, 1) < BuildConfig.VERSION_CODE; + } + + public void setUpdated() { + SharedPreferences.Editor editor = sharedPreferences.edit(); + editor.putInt(_versionCode, BuildConfig.VERSION_CODE); + editor.apply(); + } } diff --git a/app/src/main/java/com/mxt/anitrend/util/DialogUtil.java b/app/src/main/java/com/mxt/anitrend/util/DialogUtil.java index 91134e3c1..d007a8170 100644 --- a/app/src/main/java/com/mxt/anitrend/util/DialogUtil.java +++ b/app/src/main/java/com/mxt/anitrend/util/DialogUtil.java @@ -1,6 +1,7 @@ package com.mxt.anitrend.util; import android.content.Context; +import android.content.res.AssetManager; import android.graphics.Typeface; import android.support.annotation.IdRes; import android.support.annotation.StringRes; @@ -12,8 +13,14 @@ import com.afollestad.materialdialogs.MaterialDialog; import com.afollestad.materialdialogs.Theme; +import com.annimon.stream.Stream; +import com.mxt.anitrend.BuildConfig; import com.mxt.anitrend.R; +import com.mxt.anitrend.base.custom.view.text.RichMarkdownTextView; +import com.mxt.anitrend.base.custom.view.text.SingleLineTextView; +import java.io.IOException; +import java.io.InputStream; import java.util.Collection; /** @@ -193,6 +200,30 @@ public static void createCheckList(Context context, @StringRes int title, Co .autoDismiss(true).onAny(singleButtonCallback).show(); } + public static void createChangeLog(Context context) { + try { + MaterialDialog materialDialog = createDefaultDialog(context) + .customView(R.layout.dialog_changelog, true) + .build(); + + SingleLineTextView singleLineTextView = (SingleLineTextView) materialDialog.findViewById(R.id.changelog_version); + singleLineTextView.setText(String.format("v%s", BuildConfig.VERSION_NAME)); + + AssetManager assetManager = context.getAssets(); + InputStream inputStream = assetManager.open("changelog.md"); + StringBuilder stringBuilder = new StringBuilder(); + int buffer; + while ((buffer = inputStream.read()) != -1) + stringBuilder.append((char)buffer); + RichMarkdownTextView richMarkdownTextView = (RichMarkdownTextView) materialDialog.findViewById(R.id.changelog_information); + RichMarkdownTextView.richMarkDown(richMarkdownTextView, stringBuilder.toString()); + + materialDialog.show(); + } catch (IOException e) { + e.printStackTrace(); + } + } + /** * Builds themed material dialog builder for basic configuration *
diff --git a/app/src/main/java/com/mxt/anitrend/view/activity/index/MainActivity.java b/app/src/main/java/com/mxt/anitrend/view/activity/index/MainActivity.java index 57c50e823..42ca94468 100644 --- a/app/src/main/java/com/mxt/anitrend/view/activity/index/MainActivity.java +++ b/app/src/main/java/com/mxt/anitrend/view/activity/index/MainActivity.java @@ -434,6 +434,10 @@ private void setupUserItems() { * Checks to see if this instance is a new installation */ private void checkNewInstallation() { + if (getPresenter().getApplicationPref().isUpdated()) { + DialogUtil.createChangeLog(this); + getPresenter().getApplicationPref().setUpdated(); + } if(getPresenter().getApplicationPref().isFreshInstall()) { getPresenter().getApplicationPref().setFreshInstall(); mBottomSheet = new BottomSheetMessage.Builder() diff --git a/app/src/main/res/layout/dialog_changelog.xml b/app/src/main/res/layout/dialog_changelog.xml index d8fb3247f..f533067f6 100644 --- a/app/src/main/res/layout/dialog_changelog.xml +++ b/app/src/main/res/layout/dialog_changelog.xml @@ -1,6 +1,47 @@ - - \ No newline at end of file + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index cd13512a4..ccc2178ff 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -921,4 +921,17 @@ Series Tags? Google Chrome Recommended + + + + Privacy + Configure privacy settings + + Crash Reports + Enable Crash Reports (require app restart) + Disable Crash Reports (require app restart) + + Usage Analytics + Enable Usage Analytics (require app restart) + Disable Usage Analytics (require app restart) diff --git a/build.gradle b/build.gradle index 8270adf1c..5e7e2f2db 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { 'compileSdk' : 27, 'targetSdk' : 27, 'minSdk' : 17, - 'versionCode' : 79, + 'versionCode' : 80, 'versionName' : '1.1.0', 'buildTools' : '27.0.3', 'butterKnife' : '8.8.1',