fix:【光环助手V5.16.0】光环下载进度条优化-1130测试(1-3、5) https://jira.shanqu.cc/browse/GHZS-520

This commit is contained in:
叶子维
2022-11-30 19:44:58 +08:00
parent 1aa23aeeae
commit b08b6bda3b
6 changed files with 42 additions and 12 deletions

View File

@ -260,11 +260,12 @@ public class DetailDownloadUtils {
case neterror:
case subscribe:
case downloading:
case redirected:
case pause:
case overflow:
String downloadingText = "游戏加载中 " + downloadEntity.getPercent() + "%";
String resumeText = "继续加载 " + downloadEntity.getPercent() + "%";
viewHolder.mDownloadPb.setText(downloadEntity.getStatus() == DownloadStatus.downloading ? downloadingText : resumeText);
viewHolder.mDownloadPb.setText((downloadEntity.getStatus() == DownloadStatus.downloading || downloadEntity.getStatus() == DownloadStatus.redirected) ? downloadingText : resumeText);
if (downloadEntity.isPluggable() && PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_PLUGIN);
} else {
@ -338,18 +339,19 @@ public class DetailDownloadUtils {
private static void updateVStyleButton(DetailViewHolder viewHolder) {
switch (viewHolder.downloadEntity.getStatus()) {
case redirected:
case downloading:
case overflow:
viewHolder.mDownloadPb.setText("游戏加载中 " + viewHolder.downloadEntity.getPercent() + "%");
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
break;
case timeout:
case neterror:
case waiting:
case subscribe:
viewHolder.mDownloadPb.setText(R.string.waiting);
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
break;
case overflow:
case timeout:
case neterror:
case subscribe:
case pause:
viewHolder.mDownloadPb.setText("继续加载 " + viewHolder.downloadEntity.getPercent() + "%");
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);