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
053251d5
Commit
053251d5
authored
Jan 17, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge ViewModel Koin modules
parent
cf161a5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
35 deletions
+25
-35
Modules.kt
app/src/main/java/com/topjohnwu/magisk/di/Modules.kt
+1
-2
RedesignModule.kt
app/src/main/java/com/topjohnwu/magisk/di/RedesignModule.kt
+0
-32
ViewModelsModule.kt
...src/main/java/com/topjohnwu/magisk/di/ViewModelsModule.kt
+24
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/di/Modules.kt
View file @
053251d5
...
@@ -5,6 +5,5 @@ val koinModules = listOf(
...
@@ -5,6 +5,5 @@ val koinModules = listOf(
networkingModule
,
networkingModule
,
databaseModule
,
databaseModule
,
repositoryModule
,
repositoryModule
,
viewModelModules
,
viewModelModules
redesignModule
)
)
app/src/main/java/com/topjohnwu/magisk/di/RedesignModule.kt
deleted
100644 → 0
View file @
cf161a5d
package
com.topjohnwu.magisk.di
import
com.topjohnwu.magisk.ui.MainViewModel
import
com.topjohnwu.magisk.ui.flash.FlashViewModel
import
com.topjohnwu.magisk.ui.hide.HideViewModel
import
com.topjohnwu.magisk.ui.home.HomeViewModel
import
com.topjohnwu.magisk.ui.install.InstallViewModel
import
com.topjohnwu.magisk.ui.log.LogViewModel
import
com.topjohnwu.magisk.ui.module.ModuleViewModel
import
com.topjohnwu.magisk.ui.request.RequestViewModel
import
com.topjohnwu.magisk.ui.safetynet.SafetynetViewModel
import
com.topjohnwu.magisk.ui.settings.SettingsViewModel
import
com.topjohnwu.magisk.ui.superuser.SuperuserViewModel
import
com.topjohnwu.magisk.ui.theme.ThemeViewModel
import
org.koin.androidx.viewmodel.dsl.viewModel
import
org.koin.dsl.module
val
redesignModule
=
module
{
viewModel
{
FlashViewModel
()
}
viewModel
{
HideViewModel
(
get
())
}
viewModel
{
HomeViewModel
(
get
())
}
viewModel
{
LogViewModel
(
get
())
}
viewModel
{
ModuleViewModel
(
get
(),
get
(),
get
())
}
viewModel
{
RequestViewModel
()
}
viewModel
{
SafetynetViewModel
(
get
())
}
viewModel
{
SettingsViewModel
(
get
())
}
viewModel
{
SuperuserViewModel
(
get
(),
get
(),
get
())
}
viewModel
{
ThemeViewModel
()
}
viewModel
{
InstallViewModel
()
}
viewModel
{
MainViewModel
()
}
}
app/src/main/java/com/topjohnwu/magisk/di/ViewModelsModule.kt
View file @
053251d5
...
@@ -3,11 +3,34 @@ package com.topjohnwu.magisk.di
...
@@ -3,11 +3,34 @@ package com.topjohnwu.magisk.di
import
android.net.Uri
import
android.net.Uri
import
com.topjohnwu.magisk.legacy.flash.FlashViewModel
import
com.topjohnwu.magisk.legacy.flash.FlashViewModel
import
com.topjohnwu.magisk.legacy.surequest.SuRequestViewModel
import
com.topjohnwu.magisk.legacy.surequest.SuRequestViewModel
import
com.topjohnwu.magisk.ui.MainViewModel
import
com.topjohnwu.magisk.ui.hide.HideViewModel
import
com.topjohnwu.magisk.ui.home.HomeViewModel
import
com.topjohnwu.magisk.ui.install.InstallViewModel
import
com.topjohnwu.magisk.ui.log.LogViewModel
import
com.topjohnwu.magisk.ui.module.ModuleViewModel
import
com.topjohnwu.magisk.ui.request.RequestViewModel
import
com.topjohnwu.magisk.ui.safetynet.SafetynetViewModel
import
com.topjohnwu.magisk.ui.settings.SettingsViewModel
import
com.topjohnwu.magisk.ui.superuser.SuperuserViewModel
import
com.topjohnwu.magisk.ui.theme.ThemeViewModel
import
org.koin.androidx.viewmodel.dsl.viewModel
import
org.koin.androidx.viewmodel.dsl.viewModel
import
org.koin.dsl.module
import
org.koin.dsl.module
val
viewModelModules
=
module
{
val
viewModelModules
=
module
{
viewModel
{
HideViewModel
(
get
())
}
viewModel
{
HomeViewModel
(
get
())
}
viewModel
{
LogViewModel
(
get
())
}
viewModel
{
ModuleViewModel
(
get
(),
get
(),
get
())
}
viewModel
{
RequestViewModel
()
}
viewModel
{
SafetynetViewModel
(
get
())
}
viewModel
{
SettingsViewModel
(
get
())
}
viewModel
{
SuperuserViewModel
(
get
(),
get
(),
get
())
}
viewModel
{
ThemeViewModel
()
}
viewModel
{
InstallViewModel
()
}
viewModel
{
MainViewModel
()
}
// Legacy
viewModel
{
(
action
:
String
,
file
:
Uri
,
additional
:
Uri
)
->
viewModel
{
(
action
:
String
,
file
:
Uri
,
additional
:
Uri
)
->
FlashViewModel
(
action
,
file
,
additional
,
get
())
FlashViewModel
(
action
,
file
,
additional
,
get
())
}
}
...
...
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