Commit dd565a11 authored by vvb2060's avatar vvb2060 Committed by John Wu

Fix outdated state

parent 1735a713
......@@ -67,9 +67,10 @@ object Info {
) {
val versionCode = when {
code < Const.Version.MIN_VERCODE -> -1
else -> if (isRooted) code else -1
isRooted -> code
else -> -1
}
val isUnsupported = code > 0 && code < Const.Version.MIN_VERCODE
val isActive = versionCode >= 0
val isActive = versionCode > 0
}
}
......@@ -43,6 +43,7 @@ class HomeViewModel(
val magiskState
get() = when {
Info.isRooted && Info.env.isUnsupported -> State.OUTDATED
!Info.env.isActive -> State.INVALID
Info.env.versionCode < BuildConfig.VERSION_CODE -> State.OUTDATED
else -> State.UP_TO_DATE
......
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