mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-22 03:05:11 +00:00
bug fixes
This commit is contained in:
parent
6f11a9c92b
commit
933fd09e7c
4 changed files with 32 additions and 27 deletions
|
@ -11,7 +11,7 @@ android {
|
|||
applicationId "com.vanced.manager"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 4
|
||||
versionCode 5
|
||||
versionName "1.1.0 beta"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
|
|
@ -59,7 +59,15 @@ open class Home : BaseFragment() {
|
|||
microginstallbtn.setOnClickListener {
|
||||
if (!isDownloading!!) {
|
||||
val dlText = view.findViewById<TextView>(R.id.microg_downloading)
|
||||
installApk("https://x1nto.github.io/VancedFiles/microg.json", microgProgress, dlText)
|
||||
try {
|
||||
installApk(
|
||||
"https://x1nto.github.io/VancedFiles/microg.json",
|
||||
microgProgress,
|
||||
dlText
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
Toast.makeText(activity, "Unable to start installation", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(activity, "Please wait until installation finishes", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
|
|
@ -86,35 +86,32 @@ class HomeFragment : Home() {
|
|||
if (microgStatus!!) {
|
||||
val microgVer =
|
||||
pm.getPackageInfo("com.mgoogle.android.gms", 0).versionName
|
||||
when {
|
||||
microgRemoteVer > microgVer -> {
|
||||
microginstallbtn?.text = activity?.getString(R.string.update)
|
||||
microginstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.ic_cloud_upload_black_24dp)
|
||||
}
|
||||
microgRemoteVer == microgVer -> {
|
||||
microginstallbtn?.text =
|
||||
activity?.getString(R.string.button_installed)
|
||||
microginstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.outline_cloud_done_24)
|
||||
}
|
||||
if (microgRemoteVer > microgVer) {
|
||||
microginstallbtn?.text = activity?.getString(R.string.update)
|
||||
microginstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.ic_cloud_upload_black_24dp)
|
||||
}
|
||||
else if (microgRemoteVer == microgVer) {
|
||||
microginstallbtn?.text =
|
||||
activity?.getString(R.string.button_installed)
|
||||
microginstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.outline_cloud_done_24)
|
||||
}
|
||||
}
|
||||
|
||||
if (vancedStatus!!) {
|
||||
val vancedVer =
|
||||
pm.getPackageInfo("com.vanced.android.youtube", 0).versionName
|
||||
when {
|
||||
vancedRemoteVer > vancedVer -> {
|
||||
vancedinstallbtn?.text = activity?.getString(R.string.update)
|
||||
vancedinstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.ic_cloud_upload_black_24dp)
|
||||
}
|
||||
vancedRemoteVer == vancedVer -> {
|
||||
vancedinstallbtn?.text =
|
||||
activity?.getString(R.string.button_installed)
|
||||
vancedinstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.outline_cloud_done_24)
|
||||
}
|
||||
if (vancedRemoteVer > vancedVer) {
|
||||
vancedinstallbtn?.text = activity?.getString(R.string.update)
|
||||
vancedinstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.ic_cloud_upload_black_24dp)
|
||||
}
|
||||
else if (vancedRemoteVer == vancedVer) {
|
||||
vancedinstallbtn?.text =
|
||||
activity?.getString(R.string.button_installed)
|
||||
vancedinstallbtn?.icon =
|
||||
activity?.getDrawable(R.drawable.outline_cloud_done_24)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
rootProject.name='Vanced Manager'
|
||||
include ':app', ':api', ':api'
|
||||
include ':app'
|
||||
|
|
Loading…
Reference in a new issue