mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
Simply redirect isConnected ObservableField
This commit is contained in:
parent
7873433977
commit
e8e7cd5008
@ -77,8 +77,8 @@ dependencies {
|
|||||||
implementation("com.github.topjohnwu:jtar:1.0.0")
|
implementation("com.github.topjohnwu:jtar:1.0.0")
|
||||||
implementation("com.jakewharton.timber:timber:4.7.1")
|
implementation("com.jakewharton.timber:timber:4.7.1")
|
||||||
|
|
||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:${Deps.vKotlin}")
|
implementation(kotlin("stdlib"))
|
||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Deps.vKotlin}")
|
implementation(kotlin("stdlib-jdk7"))
|
||||||
|
|
||||||
val vBAdapt = "4.0.0"
|
val vBAdapt = "4.0.0"
|
||||||
val bindingAdapter = "me.tatarka.bindingcollectionadapter2:bindingcollectionadapter"
|
val bindingAdapter = "me.tatarka.bindingcollectionadapter2:bindingcollectionadapter"
|
||||||
|
@ -15,10 +15,8 @@ import androidx.navigation.NavDirections
|
|||||||
import com.topjohnwu.magisk.BR
|
import com.topjohnwu.magisk.BR
|
||||||
import com.topjohnwu.magisk.core.Info
|
import com.topjohnwu.magisk.core.Info
|
||||||
import com.topjohnwu.magisk.core.base.BaseActivity
|
import com.topjohnwu.magisk.core.base.BaseActivity
|
||||||
import com.topjohnwu.magisk.extensions.value
|
|
||||||
import com.topjohnwu.magisk.model.events.*
|
import com.topjohnwu.magisk.model.events.*
|
||||||
import com.topjohnwu.magisk.model.navigation.NavigationWrapper
|
import com.topjohnwu.magisk.model.navigation.NavigationWrapper
|
||||||
import com.topjohnwu.magisk.model.observer.Observer
|
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import org.koin.core.KoinComponent
|
import org.koin.core.KoinComponent
|
||||||
|
|
||||||
@ -34,7 +32,7 @@ abstract class BaseViewModel(
|
|||||||
val loaded @Bindable get() = state == State.LOADED
|
val loaded @Bindable get() = state == State.LOADED
|
||||||
val loadingFailed @Bindable get() = state == State.LOADING_FAILED
|
val loadingFailed @Bindable get() = state == State.LOADING_FAILED
|
||||||
|
|
||||||
val isConnected = Observer(Info.isConnected) { Info.isConnected.value }
|
val isConnected get() = Info.isConnected
|
||||||
val viewEvents: LiveData<ViewEvent> get() = _viewEvents
|
val viewEvents: LiveData<ViewEvent> get() = _viewEvents
|
||||||
val insets = ObservableField(Insets.NONE)
|
val insets = ObservableField(Insets.NONE)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools.build:gradle:4.0.0")
|
classpath("com.android.tools.build:gradle:4.0.0")
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Deps.vKotlin}")
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
|
||||||
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${Deps.vNav}")
|
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${Deps.vNav}")
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
@ -6,7 +6,6 @@ import java.io.File
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
object Deps {
|
object Deps {
|
||||||
const val vKotlin = "1.3.72"
|
|
||||||
const val vNav = "2.3.0"
|
const val vNav = "2.3.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user