From c2be62f9765a6d6cd54790325307d95eb5ac40ad Mon Sep 17 00:00:00 2001 From: Domingos Lopes Date: Sun, 7 Aug 2016 20:27:05 -0400 Subject: [PATCH] fix onMediaChanged() for ItemDescriptionFragment --- .../antennapod/fragment/ItemDescriptionFragment.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java index 89a1a8d50..a0586fe16 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java @@ -185,8 +185,10 @@ public class ItemDescriptionFragment extends Fragment implements MediaplayerInfo super.onViewCreated(view, savedInstanceState); Bundle args = getArguments(); if (args.containsKey(ARG_PLAYABLE)) { - media = args.getParcelable(ARG_PLAYABLE); - shownotesProvider = media; + if (media == null) { + media = args.getParcelable(ARG_PLAYABLE); + shownotesProvider = media; + } load(); } else if (args.containsKey(ARG_FEEDITEM_ID)) { long id = getArguments().getLong(ARG_FEEDITEM_ID); @@ -377,12 +379,14 @@ public class ItemDescriptionFragment extends Fragment implements MediaplayerInfo @Override public void onMediaChanged(Playable media) { - if(this.media == media || webvDescription == null) { + if(this.media == media) { return; } this.media = media; this.shownotesProvider = media; - load(); + if (webvDescription != null) { + load(); + } } }