mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-14 14:57:27 +00:00
Compare commits
6 Commits
manager-v7
...
manager-v7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
120bd6cd68 | ||
![]() |
9aef06d1b8 | ||
![]() |
e6e9dd751c | ||
![]() |
5dd677756f | ||
![]() |
b77c590910 | ||
![]() |
7e5f2822ae |
@@ -25,8 +25,22 @@ class MagiskHideFragment : MagiskFragment<HideViewModel, FragmentMagiskHideBindi
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.menu_magiskhide, menu)
|
||||
menu.apply {
|
||||
(findItem(R.id.app_search).actionView as? SearchView)
|
||||
?.setOnQueryTextListener(this@MagiskHideFragment)
|
||||
val query = viewModel.query.value
|
||||
val searchItem = menu.findItem(R.id.app_search)
|
||||
val searchView = searchItem.actionView as? SearchView
|
||||
|
||||
searchView?.run {
|
||||
setOnQueryTextListener(this@MagiskHideFragment)
|
||||
setQuery(query, false)
|
||||
}
|
||||
|
||||
if (query.isNotBlank()) {
|
||||
searchItem.expandActionView()
|
||||
searchView?.isIconified = false
|
||||
} else {
|
||||
searchItem.collapseActionView()
|
||||
searchView?.isIconified = true
|
||||
}
|
||||
|
||||
val showSystem = Config.showSystemApp
|
||||
|
||||
|
@@ -43,8 +43,23 @@ class ReposFragment : MagiskFragment<ModuleViewModel, FragmentReposBinding>(),
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.menu_repo, menu)
|
||||
(menu.findItem(R.id.repo_search).actionView as? SearchView)
|
||||
?.setOnQueryTextListener(this)
|
||||
|
||||
val query = viewModel.query.value
|
||||
val searchItem = menu.findItem(R.id.repo_search)
|
||||
val searchView = searchItem.actionView as? SearchView
|
||||
|
||||
searchView?.run {
|
||||
setOnQueryTextListener(this@ReposFragment)
|
||||
setQuery(query, false)
|
||||
}
|
||||
|
||||
if (query.isNotBlank()) {
|
||||
searchItem.expandActionView()
|
||||
searchView?.isIconified = false
|
||||
} else {
|
||||
searchItem.collapseActionView()
|
||||
searchView?.isIconified = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
|
@@ -22,6 +22,7 @@ import com.topjohnwu.magisk.utils.toggle
|
||||
import com.topjohnwu.magisk.view.dialogs.CustomAlertDialog
|
||||
import com.topjohnwu.magisk.view.dialogs.FingerprintAuthDialog
|
||||
import io.reactivex.Single
|
||||
import io.reactivex.disposables.Disposable
|
||||
import me.tatarka.bindingcollectionadapter2.ItemBinding
|
||||
|
||||
class SuperuserViewModel(
|
||||
@@ -38,6 +39,7 @@ class SuperuserViewModel(
|
||||
}
|
||||
|
||||
private var ignoreNext: PolicyRvItem? = null
|
||||
private var fetchTask: Disposable? = null
|
||||
|
||||
init {
|
||||
rxBus.register<PolicyEnableEvent>()
|
||||
@@ -51,7 +53,8 @@ class SuperuserViewModel(
|
||||
}
|
||||
|
||||
fun updatePolicies() {
|
||||
appRepo.fetchAll()
|
||||
if (fetchTask?.isDisposed?.not() == true) return
|
||||
fetchTask = appRepo.fetchAll()
|
||||
.flattenAsFlowable { it }
|
||||
.map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) }
|
||||
.toList()
|
||||
@@ -65,7 +68,6 @@ class SuperuserViewModel(
|
||||
.applySchedulers()
|
||||
.applyViewModel(this)
|
||||
.subscribeK { items.update(it.first, it.second) }
|
||||
.add()
|
||||
}
|
||||
|
||||
fun deletePressed(item: PolicyRvItem) {
|
||||
|
@@ -1,4 +1,3 @@
|
||||
# v7.3.1
|
||||
- Fix blank Superuser fragment under some circumstances
|
||||
- Fix incomplete repo database bug: if you experience this issue from the old version, go to Settings → Clear Repo Cache and refresh the Download fragment
|
||||
- Fix crashing when pressing fast scrolling button when logs are empty
|
||||
# v7.3.2
|
||||
- Fix potential crash in superuser fragment
|
||||
- Preserve searched state in repo fragment
|
||||
|
@@ -63,8 +63,8 @@
|
||||
|
||||
<!--About Activity-->
|
||||
<string name="app_changelog">Registre de canvis</string>
|
||||
<string name="translators" />
|
||||
<string name="app_translators">JoanVC100, QuitusAnbu27</string>
|
||||
<string name="translators">JoanVC100, QuitusAnbu27</string>
|
||||
<string name="app_translators">Traductors</string>
|
||||
|
||||
<!-- System Components, Notifications -->
|
||||
<string name="update_channel">Actualització de Magisk</string>
|
||||
|
@@ -16,7 +16,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0-beta04'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.40"
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
Reference in New Issue
Block a user