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
db4ef144
Commit
db4ef144
authored
Feb 06, 2020
by
Viktor De Pasquale
Committed by
John Wu
Feb 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary code
parent
810468c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
23 deletions
+0
-23
HomeViewModel.kt
...c/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
+0
-23
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
View file @
db4ef144
...
@@ -21,7 +21,6 @@ import com.topjohnwu.magisk.model.events.dialog.EnvFixDialog
...
@@ -21,7 +21,6 @@ import com.topjohnwu.magisk.model.events.dialog.EnvFixDialog
import
com.topjohnwu.magisk.model.events.dialog.ManagerInstallDialog
import
com.topjohnwu.magisk.model.events.dialog.ManagerInstallDialog
import
com.topjohnwu.magisk.model.events.dialog.UninstallDialog
import
com.topjohnwu.magisk.model.events.dialog.UninstallDialog
import
com.topjohnwu.magisk.model.navigation.Navigation
import
com.topjohnwu.magisk.model.navigation.Navigation
import
com.topjohnwu.magisk.model.observer.Observer
import
com.topjohnwu.magisk.ui.base.BaseViewModel
import
com.topjohnwu.magisk.ui.base.BaseViewModel
import
com.topjohnwu.magisk.ui.base.itemBindingOf
import
com.topjohnwu.magisk.ui.base.itemBindingOf
import
com.topjohnwu.magisk.utils.KObservableField
import
com.topjohnwu.magisk.utils.KObservableField
...
@@ -46,22 +45,6 @@ class HomeViewModel(
...
@@ -46,22 +45,6 @@ class HomeViewModel(
val
stateVersionManager
=
KObservableField
(
""
)
val
stateVersionManager
=
KObservableField
(
""
)
val
stateCodeManager
=
KObservableField
(
0
)
val
stateCodeManager
=
KObservableField
(
0
)
val
stateCodeStub
=
KObservableField
(
0
)
val
stateCodeStub
=
KObservableField
(
0
)
val
stateTextMagisk
=
Observer
(
stateMagisk
)
{
when
(
stateMagisk
.
value
)
{
MagiskState
.
NOT_INSTALLED
->
R
.
string
.
installed_error
.
res
()
MagiskState
.
UP_TO_DATE
->
R
.
string
.
up_to_date
.
res
()
MagiskState
.
LOADING
->
R
.
string
.
loading
.
res
()
MagiskState
.
OBSOLETE
->
R
.
string
.
obsolete
.
res
()
}
}
val
stateTextManager
=
Observer
(
stateManager
)
{
when
(
stateManager
.
value
)
{
MagiskState
.
NOT_INSTALLED
->
R
.
string
.
channel_error
.
res
()
MagiskState
.
UP_TO_DATE
->
R
.
string
.
up_to_date
.
res
()
MagiskState
.
LOADING
->
R
.
string
.
loading
.
res
()
MagiskState
.
OBSOLETE
->
R
.
string
.
obsolete
.
res
()
}
}
val
statePackageManager
=
packageName
val
statePackageManager
=
packageName
val
statePackageOriginal
=
statePackageManager
==
BuildConfig
.
APPLICATION_ID
val
statePackageOriginal
=
statePackageManager
==
BuildConfig
.
APPLICATION_ID
...
@@ -170,12 +153,6 @@ class HomeViewModel(
...
@@ -170,12 +153,6 @@ class HomeViewModel(
}
}
}
}
private
fun
String
.
clipVersion
(
other
:
String
=
""
):
String
{
val
thisVersion
=
substringBefore
(
'-'
)
val
otherVersion
=
other
.
substringBefore
(
'-'
)
return
if
(
thisVersion
!=
otherVersion
)
thisVersion
else
substringAfter
(
'-'
)
}
}
}
@Suppress
(
"unused"
)
@Suppress
(
"unused"
)
...
...
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