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:
commit
8e4faa305f
|
@ -47,9 +47,10 @@ public class AdapterUtils {
|
||||||
- media.getPosition()));
|
- media.getPosition()));
|
||||||
}
|
}
|
||||||
} else if (!media.isDownloaded()) {
|
} else if (!media.isDownloaded()) {
|
||||||
|
Log.d(TAG, "size: " + media.getSize());
|
||||||
if (media.getSize() > 0) {
|
if (media.getSize() > 0) {
|
||||||
txtvPos.setText(Converter.byteToString(media.getSize()));
|
txtvPos.setText(Converter.byteToString(media.getSize()));
|
||||||
} else if(false == media.checkedOnSizeButUnknown()) {
|
} else if(NetworkUtils.isDownloadAllowed() && false == media.checkedOnSizeButUnknown()) {
|
||||||
txtvPos.setText("{fa-spinner}");
|
txtvPos.setText("{fa-spinner}");
|
||||||
Iconify.addIcons(txtvPos);
|
Iconify.addIcons(txtvPos);
|
||||||
NetworkUtils.getFeedMediaSizeObservable(media)
|
NetworkUtils.getFeedMediaSizeObservable(media)
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
|
||||||
holder.txtvDuration.setText(Converter.getDurationStringLong(media.getDuration()));
|
holder.txtvDuration.setText(Converter.getDurationStringLong(media.getDuration()));
|
||||||
} else if (media.getSize() > 0) {
|
} else if (media.getSize() > 0) {
|
||||||
holder.txtvDuration.setText(Converter.byteToString(media.getSize()));
|
holder.txtvDuration.setText(Converter.byteToString(media.getSize()));
|
||||||
} else if(false == media.checkedOnSizeButUnknown()) {
|
} else if(NetworkUtils.isDownloadAllowed() && false == media.checkedOnSizeButUnknown()) {
|
||||||
holder.txtvDuration.setText("{fa-spinner}");
|
holder.txtvDuration.setText("{fa-spinner}");
|
||||||
Iconify.addIcons(holder.txtvDuration);
|
Iconify.addIcons(holder.txtvDuration);
|
||||||
NetworkUtils.getFeedMediaSizeObservable(media)
|
NetworkUtils.getFeedMediaSizeObservable(media)
|
||||||
|
|
|
@ -253,7 +253,7 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
|
||||||
} else {
|
} else {
|
||||||
if(media.getSize() > 0) {
|
if(media.getSize() > 0) {
|
||||||
progressLeft.setText(Converter.byteToString(media.getSize()));
|
progressLeft.setText(Converter.byteToString(media.getSize()));
|
||||||
} else if(false == media.checkedOnSizeButUnknown()) {
|
} else if(NetworkUtils.isDownloadAllowed() && false == media.checkedOnSizeButUnknown()) {
|
||||||
progressLeft.setText("{fa-spinner}");
|
progressLeft.setText("{fa-spinner}");
|
||||||
Iconify.addIcons(progressLeft);
|
Iconify.addIcons(progressLeft);
|
||||||
NetworkUtils.getFeedMediaSizeObservable(media)
|
NetworkUtils.getFeedMediaSizeObservable(media)
|
||||||
|
|
Loading…
Reference in New Issue