From 7f8ac6c681085c2c517e7dd352806a99e682d93b Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Thu, 16 Jul 2020 00:14:39 -0700 Subject: remove unneeded code --- .../java/de/danoeh/antennapod/fragment/CoverFragment.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java index ef0b87d00..a3f46542d 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java @@ -55,7 +55,6 @@ public class CoverFragment extends Fragment { private int displayedChapterIndex = -2; private Playable media; private int orientation = Configuration.ORIENTATION_UNDEFINED; - private int _position = -1; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, @@ -85,8 +84,7 @@ public class CoverFragment extends Fragment { } else { emitter.onComplete(); } - }) - .subscribeOn(Schedulers.io()) + }).subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(media -> { this.media = media; @@ -108,7 +106,6 @@ public class CoverFragment extends Fragment { root = null; } - @Override public void onStart() { super.onStart(); @@ -146,7 +143,6 @@ public class CoverFragment extends Fragment { } private void displayCoverImage(int position) { - _position = position; int chapter = ChapterUtils.getCurrentChapterIndex(media, position); if (chapter != displayedChapterIndex) { displayedChapterIndex = chapter; @@ -191,7 +187,6 @@ public class CoverFragment extends Fragment { } private void configureForOrientation(int orientation, Configuration newConfig) { - View textContainer = getView().findViewById(R.id.cover_fragment_text_container); LinearLayout mainContainer = getView().findViewById(R.id.cover_fragment); if (orientation == Configuration.ORIENTATION_PORTRAIT) { mainContainer.setOrientation(LinearLayout.VERTICAL); @@ -206,13 +201,8 @@ public class CoverFragment extends Fragment { imgvCover.getLayoutParams().width = imgvCover.getLayoutParams().height; } } - if (_position > -1) { - displayCoverImage(_position); - } - imgvCover.requestLayout(); } - @Override public void onDestroyView() { super.onDestroyView(); -- cgit v1.2.3