|
|
|
|
@ -25,11 +25,16 @@ import com.github.tvbox.osc.util.FastClickCheckUtil; |
|
|
|
|
import com.github.tvbox.osc.util.HawkConfig; |
|
|
|
|
import com.github.tvbox.osc.util.OkGoHelper; |
|
|
|
|
import com.github.tvbox.osc.util.PlayerHelper; |
|
|
|
|
import com.lzy.okgo.OkGo; |
|
|
|
|
import com.lzy.okgo.callback.FileCallback; |
|
|
|
|
import com.lzy.okgo.model.Progress; |
|
|
|
|
import com.lzy.okgo.model.Response; |
|
|
|
|
import com.orhanobut.hawk.Hawk; |
|
|
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus; |
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
@ -134,6 +139,29 @@ public class ModelSettingFragment extends BaseLazyFragment { |
|
|
|
|
dialog.show(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
findViewById(R.id.llWp).setOnClickListener(new View.OnClickListener() { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(View v) { |
|
|
|
|
FastClickCheckUtil.check(v); |
|
|
|
|
if (!ApiConfig.get().wallpaper.isEmpty()) |
|
|
|
|
OkGo.<File>get(ApiConfig.get().wallpaper).execute(new FileCallback(requireActivity().getFilesDir().getAbsolutePath(), "wp") { |
|
|
|
|
@Override |
|
|
|
|
public void onSuccess(Response<File> response) { |
|
|
|
|
((BaseActivity) requireActivity()).changeWallpaper(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onError(Response<File> response) { |
|
|
|
|
super.onError(response); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void downloadProgress(Progress progress) { |
|
|
|
|
super.downloadProgress(progress); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
findViewById(R.id.llHomeApi).setOnClickListener(new View.OnClickListener() { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(View v) { |
|
|
|
|
@ -485,4 +513,4 @@ public class ModelSettingFragment extends BaseLazyFragment { |
|
|
|
|
return "缩略图"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|