fix 重复调用弹窗接口

This commit is contained in:
zlzw 2023-09-21 11:14:01 +08:00
parent bcd8f7af52
commit 4e4b5f90bb

View File

@ -49,10 +49,18 @@ public class OpenAdManager {
}
private void init(boolean isShow) {
if (list != null && list.isEmpty()) {
return;
}
LiveNetManager.get(CommonAppContext.getTopActivity())
.activityPopup(new HttpCallback<List<OpenAdModel>>() {
@Override
public void onSuccess(List<OpenAdModel> data) {
if (data == null || data.isEmpty()) {
Log.i(TAG, "onSuccess: 没有数据");
list = new ArrayList<>();
return;
}
list = data;
if (isShow) {
show(TYPE_HOME, false);
@ -127,6 +135,7 @@ public class OpenAdManager {
this.model = model;
runnableMap.put(model.getId(), this);
}
public void dismiss() {
Log.e(TAG, "dismiss: " + model);
}