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 vancedStatus =
|
||||
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Root")
|
||||
isRootVancedInstalled()
|
||||
pm?.let { isPackageInstalled("com.google.android.youtube", it) }
|
||||
else
|
||||
pm?.let { isPackageInstalled("com.vanced.android.youtube", it) }
|
||||
|
||||
|
@ -125,11 +125,10 @@ open class Home : BaseFragment() {
|
|||
microgsettingsbtn.visibility = View.INVISIBLE
|
||||
microguninstallbtn.visibility = View.INVISIBLE
|
||||
microgVerText.text = getString(R.string.unavailable)
|
||||
vancedinstallbtn.visibility =
|
||||
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Nonroot")
|
||||
View.GONE
|
||||
else
|
||||
View.VISIBLE
|
||||
if (PreferenceManager.getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot") == "Nonroot")
|
||||
vancedinstallbtn.visibility = View.GONE
|
||||
else
|
||||
vancedinstallbtn.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
val vancedVerText = view.findViewById<TextView>(R.id.vanced_installed_version)
|
||||
|
|
Loading…
Reference in a new issue