0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2025-01-03 14:10:59 +00:00

updated old stuff

This commit is contained in:
X1nto 2021-02-28 14:17:46 +04:00
parent 2e3416ef43
commit ae37a1e406
2 changed files with 6 additions and 5 deletions

View file

@ -32,6 +32,7 @@ import com.vanced.manager.utils.AppUtils.currentLocale
import com.vanced.manager.utils.AppUtils.faqpkg
import com.vanced.manager.utils.AppUtils.log
import com.vanced.manager.utils.AppUtils.playStorePkg
import com.vanced.manager.utils.AppUtils.vancedRootPkg
import com.vanced.manager.utils.PackageHelper.isPackageInstalled
class MainActivity : AppCompatActivity() {
@ -74,7 +75,7 @@ class MainActivity : AppCompatActivity() {
initDialogs(intent.getBooleanExtra("firstLaunch", false))
manager.observe(this) {
if (manager.value?.int("versionCode") ?: 0 > VERSION_CODE) {
ManagerUpdateDialog.newInstance(false).show(this)
ManagerUpdateDialog.newInstance(true).show(this)
}
}
}
@ -208,7 +209,7 @@ class MainActivity : AppCompatActivity() {
}
} else {
if (isMiuiOptimizationsEnabled) {
DialogContainer.applyAccentMiuiDialog(this)
DialogContainer.miuiDialog(this)
}
}
@ -217,7 +218,7 @@ class MainActivity : AppCompatActivity() {
}
if (variant == "root") {
if (PackageHelper.getPackageVersionName("com.google.android.youtube", packageManager) == "14.21.54") {
if (PackageHelper.getPackageVersionName(vancedRootPkg, packageManager) == "14.21.54") {
DialogContainer.basicDialog(
getString(R.string.hold_on),
getString(R.string.magisk_vanced),

View file

@ -20,7 +20,7 @@ object DialogContainer {
}
setOnCancelListener {
if (context.isMiuiOptimizationsEnabled) {
applyAccentMiuiDialog(context)
miuiDialog(context)
}
}
create()
@ -30,7 +30,7 @@ object DialogContainer {
prefs.edit { putBoolean("firstLaunch", false) }
}
fun applyAccentMiuiDialog(context: Context) {
fun miuiDialog(context: Context) {
MaterialAlertDialogBuilder(context).apply {
setTitle(context.getString(R.string.miui_one_title))
setMessage(context.getString(R.string.miui_one))