You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Improvements to the installation UI
- No longer show irrelevant options to the user - No longer require an additional button press to start installation
This commit is contained in:
@@ -7,6 +7,7 @@ import com.topjohnwu.magisk.arch.BaseUIFragment
|
||||
import com.topjohnwu.magisk.core.download.BaseDownloadService
|
||||
import com.topjohnwu.magisk.databinding.FragmentInstallMd2Binding
|
||||
import com.topjohnwu.magisk.events.RequestFileEvent
|
||||
import com.topjohnwu.magisk.ktx.coroutineScope
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
|
||||
class InstallFragment : BaseUIFragment<InstallViewModel, FragmentInstallMd2Binding>() {
|
||||
@@ -24,7 +25,7 @@ class InstallFragment : BaseUIFragment<InstallViewModel, FragmentInstallMd2Bindi
|
||||
requireActivity().setTitle(R.string.install)
|
||||
|
||||
// Allow markwon to run in viewmodel scope
|
||||
binding.releaseNotes.tag = viewModel.viewModelScope
|
||||
binding.releaseNotes.coroutineScope = viewModel.viewModelScope
|
||||
BaseDownloadService.observeProgress(this, viewModel::onProgressUpdate)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ class InstallViewModel(
|
||||
stringRepo: StringRepository
|
||||
) : BaseViewModel(State.LOADED) {
|
||||
|
||||
val isRooted get() = Shell.rootAccess()
|
||||
val isAB get() = Info.isAB
|
||||
val isRooted = Shell.rootAccess()
|
||||
val skipOptions = Info.ramdisk && Info.isFBE && Info.isSAR
|
||||
|
||||
@get:Bindable
|
||||
var step = 0
|
||||
var step = if (skipOptions) 1 else 0
|
||||
set(value) = set(value, field, { field = it }, BR.step)
|
||||
|
||||
@get:Bindable
|
||||
|
||||
Reference in New Issue
Block a user