修改模拟器列表页由于复用产生的错误点击问题

This commit is contained in:
lyr
2021-01-06 14:58:15 +08:00
parent b598d331d4
commit ea68941bb9

View File

@ -30,8 +30,8 @@ class SimulatorManagementAdapter(context: Context) : ListAdapter<SimulatorEntity
val shouldShowUpdate = Version(simulator.apk?.version).isHigherThan(versionFromInstalledApp)
text = if (shouldShowUpdate) "更新" else "已安装"
setTextColor(if (shouldShowUpdate) R.color.theme.toColor() else R.color.text_999999.toColor())
if (shouldShowUpdate) {
setOnClickListener {
setOnClickListener {
if (shouldShowUpdate) {
SimulatorDownloadManager.getInstance().showDownloadDialog(context, simulator, SimulatorDownloadManager.SimulatorLocation.SIMULATOR_MANAGE)
}
}