fix:修复模拟器下载流程20221027测试反馈 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2125
This commit is contained in:
@ -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 = {
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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()
|
||||
|
||||
BIN
app/src/main/res/drawable-xxxhdpi/ic_go_simulator.webp
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_go_simulator.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 192 B |
@ -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" />
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user