Do not show spinner when download is not allowed

This commit is contained in:
Martin Fietz 2016-02-12 19:31:52 +01:00
parent 863ea5d162
commit 7be01a13bd
3 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -135,7 +135,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
holder.txtvDuration.setText(Converter.getDurationStringLong(media.getDuration()));
} else if (media.getSize() > 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)

View File

@ -253,7 +253,7 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
} else {
if(media.getSize() > 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)