Merge pull request #1668 from mfietz/issue/1655-spinner-glitch

Mobile Data: Do not show retrieving filesize spinner when download is not allowed
This commit is contained in:
Tom Hennen 2016-02-13 12:32:30 -05:00
commit 8e4faa305f
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)