From 7be01a13bd8389ddc7fadd2d565f03eb75a49816 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 12 Feb 2016 19:31:52 +0100 Subject: [PATCH] Do not show spinner when download is not allowed --- .../main/java/de/danoeh/antennapod/adapter/AdapterUtils.java | 3 ++- .../danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java | 2 +- .../de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AdapterUtils.java b/app/src/main/java/de/danoeh/antennapod/adapter/AdapterUtils.java index 1ea7daaa3..935a0dcd4 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AdapterUtils.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AdapterUtils.java @@ -47,9 +47,10 @@ public class AdapterUtils { - media.getPosition())); } } else if (!media.isDownloaded()) { + Log.d(TAG, "size: " + media.getSize()); if (media.getSize() > 0) { txtvPos.setText(Converter.byteToString(media.getSize())); - } else if(false == media.checkedOnSizeButUnknown()) { + } else if(NetworkUtils.isDownloadAllowed() && false == media.checkedOnSizeButUnknown()) { txtvPos.setText("{fa-spinner}"); Iconify.addIcons(txtvPos); NetworkUtils.getFeedMediaSizeObservable(media) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java index c4bcc85f5..6d4fc6f1e 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java @@ -135,7 +135,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter 0) { holder.txtvDuration.setText(Converter.byteToString(media.getSize())); - } else if(false == media.checkedOnSizeButUnknown()) { + } else if(NetworkUtils.isDownloadAllowed() && false == media.checkedOnSizeButUnknown()) { holder.txtvDuration.setText("{fa-spinner}"); Iconify.addIcons(holder.txtvDuration); NetworkUtils.getFeedMediaSizeObservable(media) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java index 05562d2da..deddc9af1 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java @@ -253,7 +253,7 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter 0) { progressLeft.setText(Converter.byteToString(media.getSize())); - } else if(false == media.checkedOnSizeButUnknown()) { + } else if(NetworkUtils.isDownloadAllowed() && false == media.checkedOnSizeButUnknown()) { progressLeft.setText("{fa-spinner}"); Iconify.addIcons(progressLeft); NetworkUtils.getFeedMediaSizeObservable(media)