diff options
author | Tony Tam <engineer.tonytam@pm.me> | 2020-07-16 00:14:39 -0700 |
---|---|---|
committer | Tony Tam <engineer.tonytam@pm.me> | 2020-07-16 00:14:39 -0700 |
commit | 7f8ac6c681085c2c517e7dd352806a99e682d93b (patch) | |
tree | b331fb26ab184c49eb190e746d4c0f912a4c3138 /app | |
parent | dba3aee7b0152805384f9f944cac38c8abada5d5 (diff) | |
download | AntennaPod-7f8ac6c681085c2c517e7dd352806a99e682d93b.zip |
remove unneeded code
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/CoverFragment.java | 12 |
1 files changed, 1 insertions, 11 deletions
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(); |