Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
dd565a11
Commit
dd565a11
authored
Aug 08, 2022
by
vvb2060
Committed by
John Wu
Aug 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix outdated state
parent
1735a713
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
Info.kt
app/src/main/java/com/topjohnwu/magisk/core/Info.kt
+3
-2
HomeViewModel.kt
...c/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
+1
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Info.kt
View file @
dd565a11
...
...
@@ -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
}
}
app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
View file @
dd565a11
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment