fix: 修复畅玩助手下载进度显示异常

This commit is contained in:
juntao
2022-06-15 17:48:23 +08:00
parent c646251b34
commit 3dc65fb415

View File

@ -20,11 +20,9 @@ import com.gh.download.DownloadManager
import com.gh.download.PackageObserver
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.fragment.BaseDraggableDialogFragment
import com.gh.gamecenter.common.constant.Constants
import com.gh.gamecenter.common.utils.toColor
import com.gh.gamecenter.common.utils.viewModelProvider
import com.gh.gamecenter.core.AppExecutor
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.databinding.DialogVspaceBinding
import com.gh.gamecenter.eventbus.EBPackage
import com.lightgame.download.DataWatcher
@ -117,7 +115,7 @@ class VSpaceDialogFragment : BaseDraggableDialogFragment() {
when (downloadEntity.status) {
downloading -> {
downloadBtn.setText(R.string.pause)
downloadBtn.progress = downloadEntity.percent.toInt()
downloadBtn.progress = (downloadEntity.percent * 10).toInt()
downloadBtn.downloadType = DownloadProgressBar.DownloadType.DOWNLOADING_NORMAL
downloadBtn.setOnClickListener {
DownloadManager.getInstance().pause(mDownloadUrl)