diff options
author | Taco <SkytkRSfan3895@gmail.com> | 2024-03-04 17:07:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 23:07:28 +0100 |
commit | 40da13e014a5b0c6e31b0234e31dac8c55473262 (patch) | |
tree | e3486b010b88415b83ae1c0467e3ce2890772fb6 /app/src/main/java/de/danoeh/antennapod | |
parent | c06a3a6d27c61910e06041c70d9113a7ef4c4c5f (diff) | |
download | AntennaPod-40da13e014a5b0c6e31b0234e31dac8c55473262.zip |
Clean up some dead code (#6952)
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
4 files changed, 6 insertions, 9 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/CoverLoader.java b/app/src/main/java/de/danoeh/antennapod/adapter/CoverLoader.java index d5c67c675..c87228cdd 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/CoverLoader.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/CoverLoader.java @@ -11,7 +11,6 @@ import com.bumptech.glide.RequestBuilder; import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.CustomViewTarget; import com.bumptech.glide.request.transition.Transition; -import de.danoeh.antennapod.activity.MainActivity; import java.lang.ref.WeakReference; @@ -21,11 +20,9 @@ public class CoverLoader { private String fallbackUri; private ImageView imgvCover; private boolean textAndImageCombined; - private MainActivity activity; private TextView fallbackTitle; - public CoverLoader(MainActivity activity) { - this.activity = activity; + public CoverLoader() { } public CoverLoader withUri(String uri) { diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java index 284f3e468..2961796c6 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java @@ -244,7 +244,7 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription count.setVisibility(View.GONE); } - CoverLoader coverLoader = new CoverLoader(mainActivityRef.get()); + CoverLoader coverLoader = new CoverLoader(); boolean textAndImageCombined; if (drawerItem.type == NavDrawerData.DrawerItem.Type.FEED) { Feed feed = ((NavDrawerData.FeedDrawerItem) drawerItem).feed; 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 01d4a10f0..fe9b55a2e 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 @@ -129,7 +129,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { } if (coverHolder.getVisibility() == View.VISIBLE) { - new CoverLoader(activity) + new CoverLoader() .withUri(ImageResourceUtils.getEpisodeListImageLocation(item)) .withFallbackUri(item.getFeed().getImageUrl()) .withPlaceholderView(placeholder) @@ -225,7 +225,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { itemView.setBackgroundResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.selectableItemBackground)); placeholder.setText(""); if (coverHolder.getVisibility() == View.VISIBLE) { - new CoverLoader(activity) + new CoverLoader() .withResource(R.color.medium_gray) .withPlaceholderView(placeholder) .withCoverView(cover) diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java index 21a29a920..8d44f419e 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java @@ -58,7 +58,7 @@ public class HorizontalItemViewHolder extends RecyclerView.ViewHolder { card.setAlpha(1.0f); float density = activity.getResources().getDisplayMetrics().density; card.setCardBackgroundColor(SurfaceColors.getColorForElevation(activity, 1 * density)); - new CoverLoader(activity) + new CoverLoader() .withUri(ImageResourceUtils.getEpisodeListImageLocation(item)) .withFallbackUri(item.getFeed().getImageUrl()) .withCoverView(cover) @@ -102,7 +102,7 @@ public class HorizontalItemViewHolder extends RecyclerView.ViewHolder { public void bindDummy() { card.setAlpha(0.1f); - new CoverLoader(activity) + new CoverLoader() .withResource(android.R.color.transparent) .withCoverView(cover) .load(); |