fix:修复模拟器下载流程20221027测试反馈 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125

This commit is contained in:
郭涛
2022-10-28 15:43:29 +08:00
parent bd9fea1551
commit ccd70b6087
8 changed files with 11 additions and 12 deletions

View File

@ -79,7 +79,7 @@ object NewSimulatorGameManager {
NewFlatLogUtils.logSimulatorUpdateAlertClick("更新")
val simulator = Config.getNewSimulatorEntitySetting()
if (simulator != null) {
SimulatorDownloadManager.getInstance().showDownloadDialog(context, simulator, SimulatorDownloadManager.SimulatorLocation.SIMULATOR_MANAGE)
SimulatorDownloadManager.getInstance().showDownloadingDialog(context, simulator)
}
},
cancelClickCallback = {

View File

@ -139,7 +139,6 @@ class SimulatorDownloadManager private constructor() {
) {
if (context == null) return
mContextRef = WeakReference(context)
this.simulatorLocation = location
this.simulator = simulator
this.gameId = gameId
@ -203,14 +202,15 @@ class SimulatorDownloadManager private constructor() {
mtaEvent = trackableEntity.event, mtaKey = trackableEntity.key,
extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)
)
if (downloadType == "update" && location != SimulatorLocation.SIMULATOR_MANAGE){
if (downloadType == "update" && location != SimulatorLocation.SIMULATOR_MANAGE) {
SPUtils.setString(SimulatorGameManager.SIMULATOR_UPDATE_SHOW_ALERT_TAG, TimeUtils.getToday())
}
}
})
}
private fun showDownloadingDialog(context: Context, simulator: SimulatorEntity?) {
fun showDownloadingDialog(context: Context, simulator: SimulatorEntity?) {
mContextRef = WeakReference(context)
val msg = FileUtils.isCanDownload(context, simulator?.apk?.size)
if (!msg.isNullOrEmpty()) {
Utils.toast(context, msg)