Skip to content

Commit

Permalink
Remove "Blur background in landscape" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
MizzleDK committed Feb 1, 2016
1 parent 0510413 commit f296c13
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/com/miz/functions/PreferenceKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ private PreferenceKeys() {} // No instantiation
public static final String IGNORE_FILESIZE_CHECK = "prefsIgnoreFilesizeCheck";
public static final String SHOW_FILE_LOCATION = "prefsShowFileLocation";
public static final String LANGUAGE_PREFERENCE = "prefsLanguagePreference";
public static final String BLUR_BACKDROPS = "prefsBlurBackdrops";
public static final String CHROMECAST_BETA_SUPPORT = "prefsChromecastBeta";
public static final String USE_FAST_BLUR = "prefsUseFastBlur";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@
import com.miz.base.MizActivity;
import com.miz.db.DbAdapterMovies;
import com.miz.functions.Actor;
import com.miz.functions.BlurTransformation;
import com.miz.functions.FileSource;
import com.miz.functions.Filepath;
import com.miz.functions.IntentKeys;
import com.miz.functions.MizLib;
import com.miz.functions.Movie;
import com.miz.functions.PaletteLoader;
import com.miz.functions.PreferenceKeys;
import com.miz.functions.SimpleAnimatorListener;
import com.miz.mizuu.EditMovie;
import com.miz.mizuu.IdentifyMovie;
Expand Down Expand Up @@ -459,11 +457,7 @@ public void onError() {}
});

if (!MizLib.isPortrait(mContext)) {
if (PreferenceManager.getDefaultSharedPreferences(mContext).getBoolean(PreferenceKeys.BLUR_BACKDROPS, false)) {
mPicasso.load(mMovie.getBackdrop()).skipMemoryCache().error(R.drawable.bg).placeholder(R.drawable.bg).transform(new BlurTransformation(mContext, mMovie.getBackdrop().getAbsolutePath(), 8)).into(mBackground);
} else {
mPicasso.load(mMovie.getBackdrop()).skipMemoryCache().error(R.drawable.bg).placeholder(R.drawable.bg).into(mBackground);
}
mPicasso.load(mMovie.getBackdrop()).skipMemoryCache().error(R.drawable.bg).placeholder(R.drawable.bg).into(mBackground);
} else {
mPicasso.load(mMovie.getBackdrop()).skipMemoryCache().placeholder(R.drawable.bg).into(mBackground, new Callback() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBarActivity;
Expand Down Expand Up @@ -58,15 +57,13 @@
import com.miz.db.DbAdapterTvShowEpisodes;
import com.miz.db.DbAdapterTvShows;
import com.miz.functions.Actor;
import com.miz.functions.BlurTransformation;
import com.miz.functions.EpisodeCounter;
import com.miz.functions.FileSource;
import com.miz.functions.Filepath;
import com.miz.functions.GridSeason;
import com.miz.functions.IntentKeys;
import com.miz.functions.MizLib;
import com.miz.functions.PaletteLoader;
import com.miz.functions.PreferenceKeys;
import com.miz.functions.SimpleAnimatorListener;
import com.miz.mizuu.EditTvShow;
import com.miz.mizuu.IdentifyTvShow;
Expand Down Expand Up @@ -399,7 +396,7 @@ public void onSuccess() {
@Override
public void onPaletteLoaded(int swatchColor) {
mToolbarColor = swatchColor;
ViewUtils.updateToolbarBackground(getActivity(), mToolbar, 0, thisShow.getTitle(), mToolbarColor);
ViewUtils.updateToolbarBackground(getActivity(), mToolbar, 0, thisShow.getTitle(), mToolbarColor);
}
});

Expand Down Expand Up @@ -430,11 +427,7 @@ public void onError() {
});

if (!MizLib.isPortrait(getActivity())) {
if (PreferenceManager.getDefaultSharedPreferences(mContext).getBoolean(PreferenceKeys.BLUR_BACKDROPS, false)) {
mPicasso.load(thisShow.getBackdrop()).skipMemoryCache().error(R.drawable.bg).placeholder(R.drawable.bg).transform(new BlurTransformation(mContext, thisShow.getBackdrop(), 8)).into(background);
} else {
mPicasso.load(thisShow.getBackdrop()).skipMemoryCache().error(R.drawable.bg).placeholder(R.drawable.bg).into(background);
}
mPicasso.load(thisShow.getBackdrop()).skipMemoryCache().error(R.drawable.bg).placeholder(R.drawable.bg).into(background);
} else {
mPicasso.load(thisShow.getBackdrop()).skipMemoryCache().placeholder(R.drawable.bg).into(background, new Callback() {
@Override
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,6 @@
<string name="see_more">See more</string>
<string name="birthday">Birthday</string>
<string name="actor_known_credits">Known credits</string>
<string name="blur_backdrops_description">Background images for movies and TV shows will be blurry in landscape mode.</string>
<string name="blur_backdrops">Blur background images</string>
<string name="sign_in_with_trakt">Sign in with Trakt.tv</string>
<string name="logged_in_as">Logged in as %s</string>
<string name="early_access">Early access testing</string>
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/res/xml/user_interface_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
android:summary="@string/overviewGridItemSizeDescription"
android:title="@string/overviewGridItemSizeTitle" />

<CheckBoxPreference
android:defaultValue="false"
android:icon="@drawable/ic_image_white_24dp"
android:key="prefsBlurBackdrops"
android:summary="@string/blur_backdrops_description"
android:title="@string/blur_backdrops" />

<CheckBoxPreference
android:defaultValue="true"
android:icon="@drawable/ic_insert_drive_file_white_24dp"
Expand Down

0 comments on commit f296c13

Please sign in to comment.