mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-24 20:25:13 +00:00
fixed buttontag getter
This commit is contained in:
parent
c1770e2217
commit
4fee34b661
1 changed files with 11 additions and 10 deletions
|
@ -43,16 +43,6 @@ class ExpandableAppListAdapter(
|
|||
appTitle.text = dataModel?.appName
|
||||
appDescription.text = dataModel?.appDescription
|
||||
dataModel?.appIcon?.let { appIcon.setImageResource(it) }
|
||||
appDownload.apply {
|
||||
val buttonTag = dataModel?.buttonTag?.value
|
||||
setOnClickListener { viewModel.openInstallDialog(buttonTag, apps[position]) }
|
||||
contentDescription = activity.getString(
|
||||
if (buttonTag == ButtonTag.UPDATE)
|
||||
R.string.accessibility_update
|
||||
else
|
||||
R.string.accessibility_download
|
||||
)
|
||||
}
|
||||
appClickableLayout.setOnClickListener {
|
||||
if (isAnimationRunning) return@setOnClickListener
|
||||
val rootHeight = root.measuredHeight
|
||||
|
@ -85,6 +75,17 @@ class ExpandableAppListAdapter(
|
|||
changelog = dataModel?.changelog?.value
|
||||
).show(activity.supportFragmentManager, "info")
|
||||
}
|
||||
dataModel?.buttonTag?.observe(activity) { buttonTag ->
|
||||
appDownload.apply {
|
||||
setOnClickListener { viewModel.openInstallDialog(buttonTag, apps[position]) }
|
||||
contentDescription = activity.getString(
|
||||
if (buttonTag == ButtonTag.UPDATE)
|
||||
R.string.accessibility_update
|
||||
else
|
||||
R.string.accessibility_download
|
||||
)
|
||||
}
|
||||
}
|
||||
dataModel?.isAppInstalled?.observe(activity) {
|
||||
appUninstall.isVisible = it
|
||||
appLaunch.isVisible = it
|
||||
|
|
Loading…
Reference in a new issue