From 0e33632e79f8a9d0e1f811933b551cc8c8eb4e24 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Tue, 8 Oct 2019 18:30:23 +0200 Subject: [PATCH] Added package name when it differs from the default one --- .../com/topjohnwu/magisk/redesign/home/HomeViewModel.kt | 6 +++--- app/src/main/res/layout/fragment_home_md2.xml | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt index 7056fbeae..2a6dd94f0 100644 --- a/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeViewModel.kt @@ -44,14 +44,14 @@ class HomeViewModel( MagiskState.OBSOLETE -> R.string.obsolete_md2.res() } } - val stateVersionMagisk = Info.magiskVersionString - val stateVersionManager = BuildConfig.VERSION_NAME + val statePackageManager = packageName + val statePackageOriginal = statePackageManager == BuildConfig.APPLICATION_ID val stateVersionUpdateMagisk = KObservableField("") val stateVersionUpdateManager = KObservableField("") val stateHideManagerName = R.string.manager.res().let { val result = R.string.manager.res() - if (packageName != BuildConfig.APPLICATION_ID) { + if (!statePackageOriginal) { result.replaceRandomWithSpecial(3) } else { result diff --git a/app/src/main/res/layout/fragment_home_md2.xml b/app/src/main/res/layout/fragment_home_md2.xml index df173d3fd..f3151efab 100644 --- a/app/src/main/res/layout/fragment_home_md2.xml +++ b/app/src/main/res/layout/fragment_home_md2.xml @@ -436,6 +436,15 @@ android:textAppearance="?appearanceTextCaptionVariant" tools:text="19.5 (12345)" /> + +