Fix app compilation

This commit is contained in:
topjohnwu 2025-07-01 23:46:56 -07:00 committed by John Wu
parent e5d36d1d24
commit d4b83b6a44
3 changed files with 7 additions and 5 deletions

View File

@ -83,7 +83,7 @@ class SettingsViewModel : BaseViewModel(), BaseSettingsItem.Handler {
// Can hide overlay windows on 12.0+
list.remove(Tapjack)
}
if (Const.Version.isCanary()) {
if (Const.Version.atLeast_30_1()) {
list.add(Restrict)
}
}

View File

@ -26,9 +26,11 @@ object Const {
const val MIN_VERSION = "v22.0"
const val MIN_VERCODE = 22000
fun atLeast_24_0() = Info.env.versionCode >= 24000
fun atLeast_25_0() = Info.env.versionCode >= 25000
fun atLeast_28_0() = Info.env.versionCode >= 28000
private fun isCanary() = (Info.env.versionCode % 100) != 0
fun atLeast_24_0() = Info.env.versionCode >= 24000 || isCanary()
fun atLeast_25_0() = Info.env.versionCode >= 25000 || isCanary()
fun atLeast_28_0() = Info.env.versionCode >= 28000 || isCanary()
fun atLeast_30_1() = Info.env.versionCode >= 30100 || isCanary()
}
object ID {

View File

@ -30,4 +30,4 @@ android.nonFinalResIds=false
# Magisk
magisk.stubVersion=40
magisk.versionCode=30000
magisk.versionCode=30001