Cleanup code

This commit is contained in:
vvb2060
2022-01-17 15:07:05 +08:00
committed by John Wu
parent 11600fc116
commit 2997258fd0
18 changed files with 8 additions and 452 deletions

View File

@@ -20,7 +20,6 @@ import com.topjohnwu.magisk.MainDirections
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.arch.BaseMainActivity
import com.topjohnwu.magisk.arch.BaseViewModel
import com.topjohnwu.magisk.arch.ReselectionTarget
import com.topjohnwu.magisk.core.*
import com.topjohnwu.magisk.databinding.ActivityMainMd2Binding
import com.topjohnwu.magisk.di.viewModel
@@ -82,9 +81,6 @@ class MainActivity : BaseMainActivity<MainViewModel, ActivityMainMd2Binding>() {
getScreen(it.itemId)?.navigate()
true
}
binding.mainNavigation.setOnItemReselectedListener {
(currentFragment as? ReselectionTarget)?.onReselected()
}
binding.mainNavigation.menu.apply {
findItem(R.id.superuserFragment)?.isEnabled = Utils.showSuperUser()
findItem(R.id.modulesFragment)?.isEnabled = Info.env.isActive