diff options
author | ByteHamster <info@bytehamster.com> | 2021-04-22 21:49:24 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-04-22 22:08:05 +0200 |
commit | c04f36bb9fd8ba659b7e95f16f3a5cad2521bdb9 (patch) | |
tree | 009707b7ba603d6148279c5716e34c252e303c82 /app/src/main/java/de/danoeh/antennapod/view | |
parent | 762140bccd1d0473c63c7a767fb4457bcaa5deca (diff) | |
download | AntennaPod-c04f36bb9fd8ba659b7e95f16f3a5cad2521bdb9.zip |
Decouple FeedMedia and PlaybackService
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/view')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java index 9fd742d5f..e83990d43 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java @@ -29,6 +29,7 @@ import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.storage.DownloadRequester; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.DateUtils; +import de.danoeh.antennapod.core.util.FeedItemUtil; import de.danoeh.antennapod.core.util.NetworkUtils; import de.danoeh.antennapod.ui.common.ThemeUtils; import de.danoeh.antennapod.ui.common.CircularProgressBar; @@ -133,7 +134,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { isVideo.setVisibility(media.getMediaType() == MediaType.VIDEO ? View.VISIBLE : View.GONE); duration.setVisibility(media.getDuration() > 0 ? View.VISIBLE : View.GONE); - if (media.isCurrentlyPlaying()) { + if (FeedItemUtil.isCurrentlyPlaying(media)) { itemView.setBackgroundColor(ThemeUtils.getColorFromAttr(activity, R.attr.currently_playing_background)); } else { itemView.setBackgroundResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.selectableItemBackground)); @@ -213,7 +214,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { } public boolean isCurrentlyPlayingItem() { - return item.getMedia() != null && item.getMedia().isCurrentlyPlaying(); + return item.getMedia() != null && FeedItemUtil.isCurrentlyPlaying(item.getMedia()); } public void notifyPlaybackPositionUpdated(PlaybackPositionEvent event) { |