Allow download modules when Magisk is not installed

This commit is contained in:
vvb2060
2020-09-24 04:53:40 +08:00
committed by John Wu
parent fa3865e962
commit de4e26b488
3 changed files with 21 additions and 14 deletions

View File

@@ -116,9 +116,8 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
override fun onResume() {
super.onResume()
binding.mainNavigation.menu.apply {
val isRoot = Shell.rootAccess()
findItem(R.id.modulesFragment)?.isEnabled = isRoot
findItem(R.id.superuserFragment)?.isEnabled = isRoot
findItem(R.id.superuserFragment)?.isEnabled = Info.env.isActive
findItem(R.id.logFragment)?.isEnabled = Info.env.isActive
}
}