mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 22:27:40 +00:00
Removed no-root state
This commit is contained in:
parent
dc62ae95a6
commit
f161cf8b0a
@ -22,7 +22,7 @@ enum class SafetyNetState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class MagiskState {
|
enum class MagiskState {
|
||||||
NO_ROOT, NOT_INSTALLED, UP_TO_DATE, OBSOLETE, LOADING
|
NOT_INSTALLED, UP_TO_DATE, OBSOLETE, LOADING
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class MagiskItem {
|
enum class MagiskItem {
|
||||||
@ -49,7 +49,6 @@ class HomeViewModel(
|
|||||||
}
|
}
|
||||||
val magiskStateText = Observer(magiskState) {
|
val magiskStateText = Observer(magiskState) {
|
||||||
when (magiskState.value) {
|
when (magiskState.value) {
|
||||||
MagiskState.NO_ROOT -> TODO()
|
|
||||||
MagiskState.NOT_INSTALLED -> R.string.magisk_version_error.res()
|
MagiskState.NOT_INSTALLED -> R.string.magisk_version_error.res()
|
||||||
MagiskState.UP_TO_DATE -> R.string.magisk_up_to_date.res()
|
MagiskState.UP_TO_DATE -> R.string.magisk_up_to_date.res()
|
||||||
MagiskState.LOADING -> R.string.checking_for_updates.res()
|
MagiskState.LOADING -> R.string.checking_for_updates.res()
|
||||||
@ -71,7 +70,6 @@ class HomeViewModel(
|
|||||||
}
|
}
|
||||||
val managerStateText = Observer(managerState) {
|
val managerStateText = Observer(managerState) {
|
||||||
when (managerState.value) {
|
when (managerState.value) {
|
||||||
MagiskState.NO_ROOT -> "wtf"
|
|
||||||
MagiskState.NOT_INSTALLED -> R.string.invalid_update_channel.res()
|
MagiskState.NOT_INSTALLED -> R.string.invalid_update_channel.res()
|
||||||
MagiskState.UP_TO_DATE -> R.string.manager_up_to_date.res()
|
MagiskState.UP_TO_DATE -> R.string.manager_up_to_date.res()
|
||||||
MagiskState.LOADING -> R.string.checking_for_updates.res()
|
MagiskState.LOADING -> R.string.checking_for_updates.res()
|
||||||
@ -234,7 +232,7 @@ class HomeViewModel(
|
|||||||
|
|
||||||
private fun ensureEnv() {
|
private fun ensureEnv() {
|
||||||
val invalidStates =
|
val invalidStates =
|
||||||
listOf(MagiskState.NOT_INSTALLED, MagiskState.NO_ROOT, MagiskState.LOADING)
|
listOf(MagiskState.NOT_INSTALLED, MagiskState.LOADING)
|
||||||
|
|
||||||
// Don't bother checking env when magisk is not installed, loading or already has been shown
|
// Don't bother checking env when magisk is not installed, loading or already has been shown
|
||||||
if (invalidStates.any { it == magiskState.value } || shownDialog) return
|
if (invalidStates.any { it == magiskState.value } || shownDialog) return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user