Added package name when it differs from the default one

This commit is contained in:
Viktor De Pasquale 2019-10-08 18:30:23 +02:00
parent a9b20dae33
commit 0e33632e79
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -436,6 +436,15 @@
android:textAppearance="?appearanceTextCaptionVariant"
tools:text="19.5 (12345)" />
<androidx.appcompat.widget.AppCompatTextView
gone="@{viewModel.statePackageOriginal}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@{viewModel.statePackageManager}"
android:textAppearance="?appearanceTextCaptionVariant"
tools:text="com.soqspa.xmclaeixl" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>