mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-22 19:25:11 +00:00
check if root vanced/regular yt exists
This commit is contained in:
parent
4c65fe114d
commit
a89a850bae
1 changed files with 5 additions and 6 deletions
|
@ -46,7 +46,7 @@ open class Home : BaseFragment() {
|
||||||
val microgStatus = pm?.let { isPackageInstalled("com.mgoogle.android.gms", it) }
|
val microgStatus = pm?.let { isPackageInstalled("com.mgoogle.android.gms", it) }
|
||||||
val vancedStatus =
|
val vancedStatus =
|
||||||
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Root")
|
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Root")
|
||||||
isRootVancedInstalled()
|
pm?.let { isPackageInstalled("com.google.android.youtube", it) }
|
||||||
else
|
else
|
||||||
pm?.let { isPackageInstalled("com.vanced.android.youtube", it) }
|
pm?.let { isPackageInstalled("com.vanced.android.youtube", it) }
|
||||||
|
|
||||||
|
@ -125,11 +125,10 @@ open class Home : BaseFragment() {
|
||||||
microgsettingsbtn.visibility = View.INVISIBLE
|
microgsettingsbtn.visibility = View.INVISIBLE
|
||||||
microguninstallbtn.visibility = View.INVISIBLE
|
microguninstallbtn.visibility = View.INVISIBLE
|
||||||
microgVerText.text = getString(R.string.unavailable)
|
microgVerText.text = getString(R.string.unavailable)
|
||||||
vancedinstallbtn.visibility =
|
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Nonroot")
|
||||||
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Nonroot")
|
vancedinstallbtn.visibility = View.GONE
|
||||||
View.GONE
|
else
|
||||||
else
|
vancedinstallbtn.visibility = View.VISIBLE
|
||||||
View.VISIBLE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val vancedVerText = view.findViewById<TextView>(R.id.vanced_installed_version)
|
val vancedVerText = view.findViewById<TextView>(R.id.vanced_installed_version)
|
||||||
|
|
Loading…
Reference in a new issue