This commit is contained in:
@ -42,6 +42,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
private static final String DOWNLOAD_URL =
|
||||
//"http://kotlinlang.org/docs/kotlin-docs.pdf";
|
||||
//"https://atom-installer.github.com/v1.13.0/AtomSetup.exe?s=1484074138&ext=.exe";
|
||||
//"http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk";
|
||||
"http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk";
|
||||
//"http://down2.xiaoshuofuwuqi.com/d/file/filetxt/20170608/14/%BA%DA%CE%D7%CA%A6%E1%C8%C6%F0.txt";
|
||||
//"http://tinghuaapp.oss-cn-shanghai.aliyuncs.com/20170612201739607815";
|
||||
|
@ -93,7 +93,8 @@ public class DownloadAdapter extends AbsRVAdapter<AbsEntity, DownloadAdapter.Sim
|
||||
}
|
||||
|
||||
public synchronized void updateState(AbsEntity entity) {
|
||||
if (entity.getState() == DownloadEntity.STATE_CANCEL) {
|
||||
if (entity.getState() == IEntity.STATE_CANCEL) {
|
||||
mData.remove(entity);
|
||||
mPositions.clear();
|
||||
int i = 0;
|
||||
for (AbsEntity entity_1 : mData) {
|
||||
@ -217,10 +218,10 @@ public class DownloadAdapter extends AbsRVAdapter<AbsEntity, DownloadAdapter.Sim
|
||||
}
|
||||
|
||||
private void handleSubChild(GroupHolder holder, final AbsEntity entity) {
|
||||
if (holder.childList.getSubData().size() > 0){
|
||||
holder.childList.updateChildProgress(((DownloadGroupEntity)entity).getSubTask());
|
||||
}else {
|
||||
holder.childList.addData(((DownloadGroupEntity)entity).getSubTask());
|
||||
if (holder.childList.getSubData().size() > 0) {
|
||||
holder.childList.updateChildProgress(((DownloadGroupEntity) entity).getSubTask());
|
||||
} else {
|
||||
holder.childList.addData(((DownloadGroupEntity) entity).getSubTask());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user