Merge remote-tracking branch 'origin/release' into dev
# Conflicts: # app/src/main/java/com/gh/common/FixedRateJobHelper.kt # app/src/main/java/com/gh/common/databind/BindingAdapters.java # app/src/main/java/com/gh/common/util/DetailDownloadUtils.java # app/src/main/java/com/gh/common/util/DialogUtils.java # app/src/main/java/com/gh/gamecenter/adapter/viewholder/DetailViewHolder.java # app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListViewModel.kt # dependencies.gradle
This commit is contained in:
@ -4,6 +4,8 @@ import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.gh.common.constant.Config;
|
||||
import com.gh.common.filter.RegionSetting;
|
||||
import com.gh.common.filter.RegionSettingHelper;
|
||||
import com.gh.common.repository.ReservationRepository;
|
||||
import com.gh.common.simulator.SimulatorGameManager;
|
||||
import com.gh.common.view.DownloadButton;
|
||||
@ -49,6 +51,12 @@ public class DetailDownloadUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
if (viewHolder.gameEntity.isSpecialDownload()) {
|
||||
viewHolder.mDownloadPb.setText("查看下载资源");
|
||||
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.SPECIAL_DOWNLOAD);
|
||||
return;
|
||||
}
|
||||
|
||||
if (viewHolder.gameEntity.isReservable()) {
|
||||
if (!ReservationRepository.thisGameHasBeenReserved(viewHolder.gameEntity.getId())) {
|
||||
if (TextUtils.isEmpty(downloadAddWord)) {
|
||||
@ -64,6 +72,13 @@ public class DetailDownloadUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
final RegionSetting.GameH5Download gameH5Download = RegionSettingHelper.getGameH5DownloadByGameId(viewHolder.gameEntity.getId());
|
||||
if (gameH5Download != null) {
|
||||
viewHolder.mDownloadPb.setText(TextUtils.isEmpty(viewHolder.gameEntity.getDownloadOffText()) ? "查看详情" : viewHolder.gameEntity.getDownloadOffText());
|
||||
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NORMAL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (viewHolder.gameEntity.isVGame() && !viewHolder.gameEntity.getApk().isEmpty()) {
|
||||
String status = GameUtils.getDownloadBtnText(viewHolder.context, viewHolder.gameEntity, PluginLocation.only_game);
|
||||
if (viewHolder.context.getString(R.string.launch).equals(status)) {
|
||||
|
||||
Reference in New Issue
Block a user