mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-12 10:13:36 +00:00
Allow restore boot when no network
This commit is contained in:
parent
58d00ab863
commit
c50daa5c9e
@ -68,8 +68,7 @@ class HomeViewModel(
|
|||||||
set(value) = set(value, field, { field = it }, BR.stateManagerProgress)
|
set(value) = set(value, field, { field = it }, BR.stateManagerProgress)
|
||||||
|
|
||||||
@get:Bindable
|
@get:Bindable
|
||||||
val showUninstall get() =
|
val showUninstall get() = Info.env.isActive && state != State.LOADING
|
||||||
Info.env.magiskVersionCode > 0 && stateMagisk != MagiskState.LOADING && isConnected.get()
|
|
||||||
|
|
||||||
@get:Bindable
|
@get:Bindable
|
||||||
val showSafetyNet get() = Info.hasGMS && isConnected.get()
|
val showSafetyNet get() = Info.hasGMS && isConnected.get()
|
||||||
@ -82,8 +81,6 @@ class HomeViewModel(
|
|||||||
|
|
||||||
override fun refresh() = viewModelScope.launch {
|
override fun refresh() = viewModelScope.launch {
|
||||||
state = State.LOADING
|
state = State.LOADING
|
||||||
notifyPropertyChanged(BR.showUninstall)
|
|
||||||
notifyPropertyChanged(BR.showSafetyNet)
|
|
||||||
svc.fetchUpdate()?.apply {
|
svc.fetchUpdate()?.apply {
|
||||||
state = State.LOADED
|
state = State.LOADED
|
||||||
stateMagisk = when {
|
stateMagisk = when {
|
||||||
@ -107,6 +104,8 @@ class HomeViewModel(
|
|||||||
ensureEnv()
|
ensureEnv()
|
||||||
}
|
}
|
||||||
} ?: apply { state = State.LOADING_FAILED }
|
} ?: apply { state = State.LOADING_FAILED }
|
||||||
|
notifyPropertyChanged(BR.showUninstall)
|
||||||
|
notifyPropertyChanged(BR.showSafetyNet)
|
||||||
}
|
}
|
||||||
|
|
||||||
val showTest = false
|
val showTest = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user