Simply redirect isConnected ObservableField

This commit is contained in:
topjohnwu 2020-07-11 03:22:17 -07:00
parent 7873433977
commit e8e7cd5008
4 changed files with 4 additions and 7 deletions

View File

@ -77,8 +77,8 @@ dependencies {
implementation("com.github.topjohnwu:jtar:1.0.0")
implementation("com.jakewharton.timber:timber:4.7.1")
implementation("org.jetbrains.kotlin:kotlin-stdlib:${Deps.vKotlin}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Deps.vKotlin}")
implementation(kotlin("stdlib"))
implementation(kotlin("stdlib-jdk7"))
val vBAdapt = "4.0.0"
val bindingAdapter = "me.tatarka.bindingcollectionadapter2:bindingcollectionadapter"

View File

@ -15,10 +15,8 @@ import androidx.navigation.NavDirections
import com.topjohnwu.magisk.BR
import com.topjohnwu.magisk.core.Info
import com.topjohnwu.magisk.core.base.BaseActivity
import com.topjohnwu.magisk.extensions.value
import com.topjohnwu.magisk.model.events.*
import com.topjohnwu.magisk.model.navigation.NavigationWrapper
import com.topjohnwu.magisk.model.observer.Observer
import kotlinx.coroutines.Job
import org.koin.core.KoinComponent
@ -34,7 +32,7 @@ abstract class BaseViewModel(
val loaded @Bindable get() = state == State.LOADED
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 insets = ObservableField(Insets.NONE)

View File

@ -17,7 +17,7 @@ buildscript {
dependencies {
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}")
// NOTE: Do not place your application dependencies here; they belong

View File

@ -6,7 +6,6 @@ import java.io.File
import java.util.*
object Deps {
const val vKotlin = "1.3.72"
const val vNav = "2.3.0"
}