Commit 8024089b authored by Viktor De Pasquale's avatar Viktor De Pasquale

Added indication of whether the manager is hidden

parent 5e01f785
......@@ -4,6 +4,14 @@ import android.content.res.Resources
val specialChars = arrayOf('!', '@', '#', '$', '%', '&', '?')
fun String.replaceRandomWithSpecial(passes: Int): String {
var string = this
repeat(passes) {
string = string.replaceRandomWithSpecial()
}
return string
}
fun String.replaceRandomWithSpecial(): String {
var random: Char
do {
......
......@@ -7,6 +7,8 @@ import com.topjohnwu.magisk.BuildConfig
import com.topjohnwu.magisk.Info
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.data.repository.MagiskRepository
import com.topjohnwu.magisk.extensions.packageName
import com.topjohnwu.magisk.extensions.replaceRandomWithSpecial
import com.topjohnwu.magisk.extensions.res
import com.topjohnwu.magisk.model.entity.MagiskJson
import com.topjohnwu.magisk.model.entity.ManagerJson
......@@ -43,6 +45,15 @@ class HomeViewModel(
}
}
val stateHideManagerName = R.string.manager.res().let {
val result = R.string.manager.res()
if (packageName != BuildConfig.APPLICATION_ID) {
result.replaceRandomWithSpecial(3)
} else {
result
}
}
val itemsMainline =
listOf(HomeItem.PayPal.Mainline, HomeItem.Patreon, HomeItem.Twitter.Mainline)
val itemsApp =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment