Skip to content

Commit

Permalink
New Changelog & Version Bump
Browse files Browse the repository at this point in the history
- New notification unread indicator
- Using search functionality to filter through users media lists
- Media, character, activity & staff link sharing
- Media overview page text selection
- Internal sorting for media titles on media lists
- Several bug fixes
  • Loading branch information
wax911 committed Jun 2, 2018
1 parent ebbfbc8 commit 7a8f17b
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/.meta/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"code": 79,
"code": 80,
"migration": false,
"releaseNotes": "",
"version": "1.1.0",
Expand Down
1 change: 1 addition & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/objectbox-build-config.json" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -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":{}}]
[{"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":{}}]
11 changes: 0 additions & 11 deletions app/src/main/assets/changelog.json

This file was deleted.

14 changes: 14 additions & 0 deletions app/src/main/assets/changelog.md
Original file line number Diff line number Diff line change
@@ -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_
12 changes: 12 additions & 0 deletions app/src/main/java/com/mxt/anitrend/util/ApplicationPref.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.support.annotation.Nullable;
import android.support.annotation.StyleRes;

import com.mxt.anitrend.BuildConfig;
import com.mxt.anitrend.R;

/**
Expand All @@ -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";

Expand Down Expand Up @@ -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();
}
}
31 changes: 31 additions & 0 deletions app/src/main/java/com/mxt/anitrend/util/DialogUtil.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;

/**
Expand Down Expand Up @@ -193,6 +200,30 @@ public static <T> 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
* <br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
47 changes: 44 additions & 3 deletions app/src/main/res/layout/dialog_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

</android.support.constraint.ConstraintLayout>
<android.support.v7.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="@dimen/series_image_lg"
app:srcCompat="@drawable/ic_emoji_announce"/>

<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/spacing_md" />

<com.mxt.anitrend.base.custom.view.text.SingleLineTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:text="What's New AniTrend?" />

<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/md_margin" />

<com.mxt.anitrend.base.custom.view.text.SingleLineTextView
android:id="@+id/changelog_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:text="Version 1.1.0" />

<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/spacing_sm" />

<com.mxt.anitrend.base.custom.view.text.RichMarkdownTextView
android:id="@+id/changelog_information"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>
13 changes: 13 additions & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -921,4 +921,17 @@
<string name="app_filter_tags">Series Tags?</string>

<string name="anitrend_sign_in_browser">Google Chrome Recommended</string>

<!-- Privacy Settings -->

<string name="pref_header_privacy">Privacy</string>
<string name="pref_header_privacy_summary">Configure privacy settings</string>

<string name="pref_title_crash_reports">Crash Reports</string>
<string name="pref_crash_reports_summary_off">Enable Crash Reports (require app restart)</string>
<string name="pref_crash_reports_summary_on">Disable Crash Reports (require app restart)</string>

<string name="pref_title_usage_analytics">Usage Analytics</string>
<string name="pref_usage_analytics_summary_off">Enable Usage Analytics (require app restart)</string>
<string name="pref_usage_analytics_summary_on">Disable Usage Analytics (require app restart)</string>
</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7a8f17b

Please sign in to comment.