修复下载相关无法即时刷新页面问题

This commit is contained in:
kehaoyuan
2018-01-25 19:06:04 +08:00
parent 0e791133dd
commit b9ff0b1c88
2 changed files with 7 additions and 30 deletions

View File

@ -61,9 +61,10 @@ public class DownloadItemUtils {
gameEntity.setEntryMap(entryMap);
}
entryMap.put(platform, downloadEntity);
if (!DownloadStatus.pause.equals(DownloadManager.getInstance(context).getStatus(downloadEntity.getUrl()))) {
adapter.notifyItemChanged(index);
}
adapter.notifyItemChanged(index);
// if (!DownloadStatus.pause.equals(DownloadManager.getInstance(context).getStatus(downloadEntity.getUrl()))) {
// adapter.notifyItemChanged(index);
// }
} else {
if (!queue.contains(platform)) {
queue.offer(platform);
@ -266,6 +267,7 @@ public class DownloadItemUtils {
} else if (status.equals(DownloadStatus.pause)
|| status.equals(DownloadStatus.timeout)
|| status.equals(DownloadStatus.neterror)) {
Utils.log("=============AAAA::" + status);
holder.gameProgressbar.setProgress((int) (downloadEntity.getPercent() * 10));
if (isShowPlatform && platform != null) {
holder.gameDownloadSpeed.setText(String.format("%s - 暂停", platform));