mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-06 15:30:46 -05:00
Fixed issues after merge
This commit is contained in:
@@ -114,9 +114,6 @@ class HideViewModel(
|
||||
|
||||
fun toggleItem(item: HideProcessItem) = magiskRepo
|
||||
.toggleHide(item.isHidden.value, item.item.packageName, item.item.name)
|
||||
// might wanna reorder the list to display the item at the top
|
||||
.subscribeK()
|
||||
.add()
|
||||
|
||||
fun toggle(item: KObservableField<Boolean>) = item.toggle()
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ class LogViewModel(
|
||||
.ignoreElement()
|
||||
|
||||
val console = repo.fetchMagiskLogs()
|
||||
.toList()
|
||||
.map { it.map { ConsoleRvItem(it) } }
|
||||
.observeOn(Schedulers.computation())
|
||||
.map { it to itemsConsole.calculateDiff(it) }
|
||||
@@ -90,7 +91,6 @@ class LogViewModel(
|
||||
}
|
||||
|
||||
fun clearMagiskLog() = repo.clearMagiskLogs()
|
||||
.ignoreElement()
|
||||
.subscribeK {
|
||||
SnackbarEvent(R.string.logs_cleared).publish()
|
||||
requestRefresh()
|
||||
|
||||
@@ -18,8 +18,8 @@ import com.topjohnwu.magisk.model.events.dialog.SuperuserRevokeDialog
|
||||
import com.topjohnwu.magisk.model.navigation.Navigation
|
||||
import com.topjohnwu.magisk.redesign.compat.CompatViewModel
|
||||
import com.topjohnwu.magisk.redesign.home.itemBindingOf
|
||||
import com.topjohnwu.magisk.utils.BiometricHelper
|
||||
import com.topjohnwu.magisk.utils.DiffObservableList
|
||||
import com.topjohnwu.magisk.utils.FingerprintHelper
|
||||
import com.topjohnwu.magisk.utils.RxBus
|
||||
import com.topjohnwu.magisk.utils.currentLocale
|
||||
import io.reactivex.Single
|
||||
@@ -71,7 +71,7 @@ class SuperuserViewModel(
|
||||
.subscribeK { items.removeAll { it.itemSameAs(item) } }
|
||||
.add()
|
||||
|
||||
if (FingerprintHelper.useFingerprint()) {
|
||||
if (BiometricHelper.isEnabled) {
|
||||
BiometricDialog {
|
||||
onSuccess { updateState() }
|
||||
}.publish()
|
||||
@@ -115,7 +115,7 @@ class SuperuserViewModel(
|
||||
.add()
|
||||
}
|
||||
|
||||
if (FingerprintHelper.useFingerprint()) {
|
||||
if (BiometricHelper.isEnabled) {
|
||||
BiometricDialog {
|
||||
onSuccess { updateState() }
|
||||
onFailure { item.isEnabled.toggle() }
|
||||
|
||||
Reference in New Issue
Block a user