Skip to content

Commit

Permalink
Merge branch 'hotfix/patch' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wax911 committed Jan 30, 2019
2 parents 72f47d2 + 7dcebf4 commit 1fb81c4
Show file tree
Hide file tree
Showing 51 changed files with 1,507 additions and 292 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# AniTrend v1.2.5   [![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/AniTrend/anitrend-app/blob/master/LICENSE.md)
# [ :biohazard: W.I.P v2.0 :biohazard: ] AniTrend v1.3.1   [![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/AniTrend/anitrend-app/blob/master/LICENSE.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/30a8f983c55541cbb504671ecc32786c)](https://www.codacy.com/app/wax911/anitrend-app?utm_source=github.com&utm_medium=referral&utm_content=wax911/anitrend-app&utm_campaign=Badge_Grade)   [![Build Status](https://travis-ci.org/AniTrend/anitrend-app.svg?branch=master)](https://travis-ci.org/AniTrend/anitrend-app)   [![Waffle.io - Columns and their card count](https://badge.waffle.io/AniTrend/anitrend-app.svg?columns=all)](https://waffle.io/AniTrend/anitrend-app)

Discover anime or manga with AniTrend which is a free [AniList](https://anilist.co) android client written in java.(AniTrend does not offer streaming capabilities, but official website links such as Hulu, Chrunchyroll, Netflix will be provided if available)

Big shout out to all the testers, translators and donators on the [AniTrend Discord Server](https://discord.gg/nqsFGgX) helping me keep this project alive!
Big shout out to all the testers, translators and donators on the [AniTrend Discord Server](https://discord.gg/nMJzbEY) helping me keep this project alive!

###### Feel free to donate the weeb cause with [Patreon](https://www.patreon.com/wax911) or [PayPal](https://www.paypal.me/mmax9)

Expand Down
4 changes: 2 additions & 2 deletions app/.meta/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"code": 95,
"code": 101,
"migration": false,
"releaseNotes": "",
"version": "1.2.5",
"version": "1.3.1",
"appId": "com.mxt.anitrend"
}
18 changes: 10 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.objectbox'
apply plugin: 'io.fabric'

Expand All @@ -12,6 +13,7 @@ android {
versionName rootProject.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
Expand Down Expand Up @@ -129,9 +131,6 @@ dependencies {
/** Material Dialogs Library*/
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'

/** Material Search View */
implementation 'com.miguelcatalan:materialsearchview:1.4.0'

/** Object Box */
implementation "io.objectbox:objectbox-android:${rootProject.objectBox}"
annotationProcessor "io.objectbox:objectbox-processor:${rootProject.objectBox}"
Expand All @@ -143,17 +142,14 @@ dependencies {
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'

/** Java Streams Port */
implementation 'com.annimon:stream:1.1.9'
implementation 'com.annimon:stream:1.2.1'

/** Highly Customizable Video Player */
implementation 'cn.jzvd:jiaozivideoplayer:6.2.12'
implementation 'cn.jzvd:jiaozivideoplayer:6.4.0'

/** Photo View */
implementation 'com.github.chrisbanes:PhotoView:2.1.3'

/** Reveal Animation */
implementation 'com.github.XunMengWinter:CircularAnim:0.3.4'

/** Alerter */
implementation 'com.tapadoo.android:alerter:2.0.4'

Expand All @@ -175,6 +171,12 @@ dependencies {

/** About Library */
implementation 'com.github.medyo:android-about-page:1.2.4'

/** Multi Dex */
implementation 'com.android.support:multidex:1.0.3'

/** Material Search View */
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
}

apply plugin: 'com.google.gms.google-services'
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":95,"versionName":"1.2.5","enabled":true,"outputFile":"anitrend_v1.2.5_rc_95.apk","fullName":"release","baseName":"release"},"path":"anitrend_v1.2.5_rc_95.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":101,"versionName":"1.3.1","enabled":true,"outputFile":"anitrend_v1.3.1_rc_101.apk","fullName":"release","baseName":"release"},"path":"anitrend_v1.3.1_rc_101.apk","properties":{}}]
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@
android:label="@string/nav_about"
android:launchMode="singleTop" />

<activity android:name=".view.activity.base.ReportActivity"
android:label="@string/nav_about"
android:launchMode="singleTop" />

<activity android:name=".view.activity.index.SearchActivity"
android:label="@string/action_search"
android:launchMode="singleTop" />
Expand Down Expand Up @@ -190,7 +194,6 @@
android:launchMode="singleTop" />

<service android:name=".service.TagGenreService" />
<service android:name=".service.AuthenticatorService" />

<receiver android:name=".receiver.SchedulerDelegate">
<intent-filter>
Expand Down
28 changes: 21 additions & 7 deletions app/src/main/assets/changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
__Anitrend v2.0 Coming Soon [WIP]__
__Anitrend v2.0 Coming Soon [W.I.P] This is the last update for v1.X all efforts are being moved to v2.0__

__N.B__ v2.0 will be dropping support for Jellybean - Kitkat, due to missing or disabled _(TLS v1.2)_
which can result in authentication errors [read more](https://github.com/square/okhttp/issues/2372)

#### Enhancements
- New swedish translations
- New portuguese translations
- Updated italian translations
- Bug reporter (Silver)
- Updated german translation, added nl region
- Image preview download & share feature (Mittens)

#### Bug Fixes
- Improved authentication flow
- Crunchyroll link detection issues
- Notification crashes after latest anilist update
- Notifications & Improved Job Scheduler
- Temporary fix for pre-lollipop login issues

#### Current Issues
- Clicking on @username shows mixed feed
- Notifications are still a hit or miss issue on some devices
- Sometimes image slide count doesn't change when you scroll slowly in feeds
- Sometimes image slide count doesn't change when you scroll slowly in feeds

#### Special Thanks
_Translators (minna arigato) & all of you lovely weebs <3_

__Admins, Devs & Cutie Pies:__
_Mittens, Senpai, Kuji, Moka, Flare, Silver, Mrspits4ever_

__Awesome Donators:__
_Bas, Golumpa, artemisthemp, Trivernis_

22 changes: 20 additions & 2 deletions app/src/main/java/com/mxt/anitrend/App.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package com.mxt.anitrend;

import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;

import com.crashlytics.android.core.CrashlyticsCore;
import com.google.android.gms.security.ProviderInstaller;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.mxt.anitrend.model.entity.MyObjectBox;
import com.mxt.anitrend.util.ApplicationPref;
Expand All @@ -23,7 +27,7 @@
* Application class
*/

public class App extends Application {
public class App extends MultiDexApplication {

private @Nullable FirebaseAnalytics analytics;
private BoxStore boxStore;
Expand Down Expand Up @@ -62,6 +66,19 @@ private void initApp(ApplicationPref pref) {
analytics.setMinimumSessionDuration(5000L);
}
JobSchedulerUtil.scheduleJob(getApplicationContext());
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
ProviderInstaller.installIfNeededAsync(getApplicationContext(),
new ProviderInstaller.ProviderInstallListener() {
@Override
public void onProviderInstalled() {

}

@Override
public void onProviderInstallFailed(int i, Intent intent) {

}
});
}

@Override
Expand All @@ -76,6 +93,7 @@ public void onCreate() {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(LocaleUtil.onAttach(base));
MultiDex.install(this);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,14 @@ public abstract class ActivityBase<M, P extends CommonPresenter> extends AppComp

/**
* Some activities may have custom themes and if that's the case
* override this method and set your own theme style, also if you wish
* to apply the default navigation bar style for light themes
* @see ActivityBase#setNavigationStyle()
* override this method and set your own theme style.
*/
protected void configureActivity() {
ApplicationPref applicationPref = new ApplicationPref(this);
if(!CompatUtil.isLightTheme((style = applicationPref.getTheme())) && applicationPref.isBlackThemeEnabled())
setTheme(R.style.AppThemeBlack);
else
setTheme(style);
setNavigationStyle();
}

@Override
Expand All @@ -123,24 +120,6 @@ protected void onPostCreate(@Nullable Bundle savedInstanceState) {
}
}

/**
* Changes the navigation bar color depending on the selected theme
*/
protected void setNavigationStyle() {
if(!disableNavigationStyle && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (style == R.style.AppThemeLight)
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
else
getWindow().clearFlags(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
}
}

public App getApplicationBase() {
if(application == null)
application = ((App)getApplication());
return application;
}

/**
* Set a {@link Toolbar Toolbar} to act as the
* {@link ActionBar} for this Activity window.
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.mxt.anitrend.model.entity.base.UserBase;
import com.mxt.anitrend.model.entity.crunchy.MediaContent;
import com.mxt.anitrend.model.entity.crunchy.Thumbnail;
import com.mxt.anitrend.service.AuthenticatorService;
import com.mxt.anitrend.service.TagGenreService;
import com.mxt.anitrend.util.CompatUtil;

Expand Down Expand Up @@ -147,8 +146,7 @@ public void checkValidAuth() {
if(boxQuery.getCurrentUser() == null) {
Log.e("checkValidAuth", "Last attempt to authenticate failed, refreshing session!");
WebTokenRequest.invalidateInstance(getContext());
} else
getContext().startService(new Intent(getContext(), AuthenticatorService.class));
}
}
}
}
Loading

0 comments on commit 1fb81c4

Please sign in to comment.