初步对接预约接口

This commit is contained in:
chenjuntao
2019-06-18 18:15:46 +08:00
parent 50ad63735f
commit b52960c47f
12 changed files with 175 additions and 51 deletions

View File

@ -26,6 +26,7 @@ import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.gamecenter.manager.UserManager;
import com.lightgame.download.DownloadConfig;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.DownloadStatus;
@ -128,7 +129,7 @@ public class DownloadItemUtils {
}
// 显示预约
if (gameEntity.getCanReserve()) {
if (gameEntity.isReservable()) {
holder.gameDes.setVisibility(View.VISIBLE);
holder.gameProgressbar.setVisibility(View.GONE);
holder.gameInfo.setVisibility(View.GONE);
@ -311,10 +312,10 @@ public class DownloadItemUtils {
final String location,
final ExposureEvent traceEvent) {
if (gameEntity.getCanReserve()) {
if (gameEntity.isReservable()) {
downloadBtn.setOnClickListener(v -> {
CheckLoginUtils.checkLogin(context, entrance, () -> {
ReserveDialogFragment dialogFragment = new ReserveDialogFragment();
ReserveDialogFragment dialogFragment = ReserveDialogFragment.getInstance(UserManager.getInstance().getUserId(), gameEntity.getId());
dialogFragment.show(((AppCompatActivity) context).getSupportFragmentManager(), "reserve");
});
});