整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 DownloadCompleteSecondViewModel.java 源代码,内容仅作参考
package com.ys.resemble.ui.mine;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.databinding.ObservableArrayList;
import androidx.databinding.ObservableBoolean;
import com.wholepoint.wpfilms.R;
import com.ys.resemble.app.AppApplication;
import com.ys.resemble.data.AppRepository;
import com.ys.resemble.data.local.VideoDownloadDao;
import com.ys.resemble.entity.table.VideoDownloadEntity;
import com.ys.resemble.ui.toolbar.ToolbarViewModel;
import com.ys.resemble.util.OkHttp3Util;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import okhttp3.Response;
public class DownloadCompleteSecondViewModel extends ToolbarViewModel<AppRepository> {
public ObservableBoolean OooOO0o;
public ObservableArrayList<o00OO> OooOOO;
public ObservableArrayList<o00OO> OooOOO0;
public me.tatarka.bindingcollectionadapter2.OooO0OO<o00OO> OooOOOO;
public me.goldze.mvvmhabit.binding.command.OooO00o OooOOOo;
public me.goldze.mvvmhabit.binding.command.OooO00o OooOOo0;
public class OooO00o implements OkHttp3Util.OkHttpCallBack {
OooO00o(DownloadCompleteSecondViewModel downloadCompleteSecondViewModel) {
}
@Override
public void onFailure(IOException iOException) {
me.goldze.mvvmhabit.utils.OooOO0.OooO0Oo("wangyi", "get失败:" + iOException.toString());
}
@Override
public void onSuccess(Response response) {
me.goldze.mvvmhabit.utils.OooOO0.OooO0Oo("wangyi", "成功");
}
}
public DownloadCompleteSecondViewModel(@NonNull Application application, AppRepository appRepository) {
super(application, appRepository);
this.OooOO0o = new ObservableBoolean(false);
this.OooOOO0 = new ObservableArrayList<>();
this.OooOOO = new ObservableArrayList<>();
this.OooOOOO = me.tatarka.bindingcollectionadapter2.OooO0OO.OooO0OO(12, R.layout.item_download_complete_second);
this.OooOOOo = new me.goldze.mvvmhabit.binding.command.OooO00o(new BindingAction() {
@Override
public final void call() {
DownloadCompleteSecondViewModel.this.OooOOOO();
}
});
this.OooOOo0 = new me.goldze.mvvmhabit.binding.command.OooO00o(new BindingAction() {
@Override
public final void call() {
DownloadCompleteSecondViewModel.this.OooOOo0();
}
});
this.OooO0oO.set(true);
}
public void OooOOOO() {
Iterator<o00OO> it = this.OooOOO0.iterator();
while (it.hasNext()) {
o00OO next = it.next();
this.OooOOO.remove(next);
OooOO0o("http://127.0.0.1:" + AppApplication.OooO0OO + "/download_control?resource=" + next.OooO0Oo.getStreamid() + "&type=5");
VideoDownloadDao.getInstance().deleteHistory(next.OooO0Oo);
}
me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0O0(new com.ys.resemble.event.OooOo());
}
public void OooOOo0() {
Iterator<o00OO> it = this.OooOOO.iterator();
while (it.hasNext()) {
o00OO next = it.next();
next.OooO0o.set(Boolean.TRUE);
this.OooOOO0.add(next);
}
}
@Override
public void OooOO0O() {
super.OooOO0O();
if (this.OooOO0o.get()) {
this.OooO0o.set("删除");
this.OooOO0o.set(false);
this.OooOOO0.clear();
Iterator<o00OO> it = this.OooOOO.iterator();
while (it.hasNext()) {
it.next().OooO0o.set(Boolean.FALSE);
}
return;
}
this.OooO0o.set("取消");
this.OooOO0o.set(true);
}
public void OooOO0o(String str) {
OkHttp3Util.OooO00o(str, new OooO00o(this));
}
public void OooOOO0(List<VideoDownloadEntity> list) {
this.OooO0o0.set(list.get(0).getName());
for (int i = 0; i < list.size(); i++) {
this.OooOOO.add(new o00OO(this, list.get(i), list));
}
}
}