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)

View File

@ -91,7 +91,7 @@ class SimulatorGameListFragment : ListFragment<GameEntity, SimulatorGameListView
mSimulatorGameViewModel = viewModelProviderFromParent()
mBinding?.run {
AdHelper.getAdForLocation(AdHelper.LOCATION_SIMULATOR_GAME)?.let { ad ->
simulatorGameSubLayout.run {
simulatorGameLayout.run {
setOnClickListener {
MtaHelper.onEvent("广告位统计", "模拟器游戏", ad.title)
NewFlatLogUtils.logSimulatorGameCollectionClick()

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

View File

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="999dp" />
<corners android:radius="2dp" />
<solid android:color="#1AFFA142" />

View File

@ -35,7 +35,7 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_jump" />
android:background="@drawable/ic_go_simulator" />
</LinearLayout>
</LinearLayout>

View File

@ -90,18 +90,17 @@
<TextView
android:id="@+id/recent_played_tag"
android:layout_width="44dp"
android:layout_height="13dp"
android:layout_width="48dp"
android:layout_height="14dp"
android:layout_marginLeft="4dp"
android:background="@drawable/button_round_1affa142"
android:gravity="center"
android:text="近期玩过"
android:textColor="@color/text_F8A142"
android:textSize="9sp"
android:textSize="10sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/game_name"
app:layout_constraintLeft_toRightOf="@+id/game_name"
app:layout_constraintRight_toLeftOf="@+id/game_kaifu_type"
app:layout_constraintTop_toTopOf="@+id/game_name" />
<TextView

View File

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/F4F5F6">
android:background="@color/background_space">
<TextView
android:id="@+id/btn_manager"