补充礼物包裹的下载
This commit is contained in:
parent
ee7374d816
commit
06bc518372
@ -102,6 +102,12 @@ public class GiftCacheUtil {
|
||||
* 设置下载列表
|
||||
*/
|
||||
public void setDownloadList(List<LiveGiftBean> list) {
|
||||
downloadCache.clear();
|
||||
for (LiveGiftBean bean : list) {
|
||||
downloadCache.put(bean.getId(), bean);
|
||||
}
|
||||
}
|
||||
public void addDownloadList(List<LiveGiftBean> list){
|
||||
for (LiveGiftBean bean : list) {
|
||||
downloadCache.put(bean.getId(),bean);
|
||||
}
|
||||
@ -240,7 +246,7 @@ public class GiftCacheUtil {
|
||||
break;
|
||||
}
|
||||
if(downloadCache.isEmpty()){
|
||||
downloading = false;
|
||||
resetStatus();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
@ -378,6 +378,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
String giftJson = obj.getString("giftlist");
|
||||
List<LiveGiftBean> list = JSON.parseArray(giftJson, LiveGiftBean.class);
|
||||
GiftCacheUtil.getInstance().addDownloadList(list);
|
||||
if(!GiftCacheUtil.getInstance().isDownloading()){
|
||||
GiftCacheUtil.getInstance().downloadAllGift();
|
||||
}
|
||||
int size = list.size();
|
||||
if (size <= 0) {
|
||||
mVPWrapList.setBackground(getResources().getDrawable(R.mipmap.wrap_empty));
|
||||
|
@ -97,7 +97,6 @@ public class LiveNewRoomClassDialogFragment extends AbsDialogFragment implements
|
||||
|
||||
@Override
|
||||
public void onItemClick(LiveClassBean bean, int position) {
|
||||
System.out.println("bean = " + bean + ", position = " + position);
|
||||
bean.setChecked(true);
|
||||
if(mCallback!=null){
|
||||
mCallback.callback(bean);
|
||||
|
Loading…
Reference in New Issue
Block a user