2019-04-11 20:01:49 +02:00
|
|
|
package com.topjohnwu.magisk.di
|
|
|
|
|
2019-04-24 20:28:41 +02:00
|
|
|
import android.net.Uri
|
2019-04-11 20:01:49 +02:00
|
|
|
import com.topjohnwu.magisk.ui.MainViewModel
|
2019-04-24 20:28:41 +02:00
|
|
|
import com.topjohnwu.magisk.ui.flash.FlashViewModel
|
2019-04-19 16:32:01 +02:00
|
|
|
import com.topjohnwu.magisk.ui.hide.HideViewModel
|
2019-04-13 00:14:37 +02:00
|
|
|
import com.topjohnwu.magisk.ui.home.HomeViewModel
|
2019-04-22 14:11:41 +02:00
|
|
|
import com.topjohnwu.magisk.ui.log.LogViewModel
|
2019-04-20 23:44:08 +02:00
|
|
|
import com.topjohnwu.magisk.ui.module.ModuleViewModel
|
2019-04-17 18:27:03 +02:00
|
|
|
import com.topjohnwu.magisk.ui.superuser.SuperuserViewModel
|
2019-04-26 21:23:25 +02:00
|
|
|
import com.topjohnwu.magisk.ui.surequest.SuRequestViewModel
|
2019-04-11 20:01:49 +02:00
|
|
|
import org.koin.androidx.viewmodel.dsl.viewModel
|
|
|
|
import org.koin.dsl.module
|
2019-10-02 19:42:38 +02:00
|
|
|
import com.topjohnwu.magisk.redesign.MainViewModel as RedesignViewModel
|
2019-10-03 17:31:45 +02:00
|
|
|
import com.topjohnwu.magisk.redesign.home.HomeViewModel as RedesignHomeViewModel
|
2019-04-11 20:01:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
val viewModelModules = module {
|
|
|
|
viewModel { MainViewModel() }
|
2019-05-24 15:50:20 +02:00
|
|
|
viewModel { HomeViewModel(get()) }
|
2019-04-19 19:22:18 +02:00
|
|
|
viewModel { SuperuserViewModel(get(), get(), get(), get()) }
|
2019-04-19 16:32:01 +02:00
|
|
|
viewModel { HideViewModel(get(), get()) }
|
2019-05-30 01:05:48 -07:00
|
|
|
viewModel { ModuleViewModel(get(), get(), get()) }
|
2019-04-22 14:11:41 +02:00
|
|
|
viewModel { LogViewModel(get(), get()) }
|
2019-07-10 16:33:01 +02:00
|
|
|
viewModel { (action: String, file: Uri, additional: Uri) ->
|
|
|
|
FlashViewModel(action, file, additional, get())
|
|
|
|
}
|
2019-04-26 21:23:25 +02:00
|
|
|
viewModel { SuRequestViewModel(get(), get(), get(SUTimeout), get()) }
|
2019-10-02 19:42:38 +02:00
|
|
|
|
|
|
|
// redesign
|
|
|
|
|
|
|
|
viewModel { RedesignViewModel() }
|
2019-10-03 17:31:45 +02:00
|
|
|
viewModel { RedesignHomeViewModel() }
|
2019-04-11 20:01:49 +02:00
|
|
|
}
|