mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-14 16:17: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) {
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
inflater.inflate(R.menu.menu_magiskhide, menu)
|
inflater.inflate(R.menu.menu_magiskhide, menu)
|
||||||
menu.apply {
|
menu.apply {
|
||||||
(findItem(R.id.app_search).actionView as? SearchView)
|
val query = viewModel.query.value
|
||||||
?.setOnQueryTextListener(this@MagiskHideFragment)
|
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
|
val showSystem = Config.showSystemApp
|
||||||
|
|
||||||
|
@@ -43,8 +43,23 @@ class ReposFragment : MagiskFragment<ModuleViewModel, FragmentReposBinding>(),
|
|||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
inflater.inflate(R.menu.menu_repo, menu)
|
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 {
|
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.CustomAlertDialog
|
||||||
import com.topjohnwu.magisk.view.dialogs.FingerprintAuthDialog
|
import com.topjohnwu.magisk.view.dialogs.FingerprintAuthDialog
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
import me.tatarka.bindingcollectionadapter2.ItemBinding
|
import me.tatarka.bindingcollectionadapter2.ItemBinding
|
||||||
|
|
||||||
class SuperuserViewModel(
|
class SuperuserViewModel(
|
||||||
@@ -38,6 +39,7 @@ class SuperuserViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private var ignoreNext: PolicyRvItem? = null
|
private var ignoreNext: PolicyRvItem? = null
|
||||||
|
private var fetchTask: Disposable? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
rxBus.register<PolicyEnableEvent>()
|
rxBus.register<PolicyEnableEvent>()
|
||||||
@@ -51,7 +53,8 @@ class SuperuserViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun updatePolicies() {
|
fun updatePolicies() {
|
||||||
appRepo.fetchAll()
|
if (fetchTask?.isDisposed?.not() == true) return
|
||||||
|
fetchTask = appRepo.fetchAll()
|
||||||
.flattenAsFlowable { it }
|
.flattenAsFlowable { it }
|
||||||
.map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) }
|
.map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) }
|
||||||
.toList()
|
.toList()
|
||||||
@@ -65,7 +68,6 @@ class SuperuserViewModel(
|
|||||||
.applySchedulers()
|
.applySchedulers()
|
||||||
.applyViewModel(this)
|
.applyViewModel(this)
|
||||||
.subscribeK { items.update(it.first, it.second) }
|
.subscribeK { items.update(it.first, it.second) }
|
||||||
.add()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun deletePressed(item: PolicyRvItem) {
|
fun deletePressed(item: PolicyRvItem) {
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
# v7.3.1
|
# v7.3.2
|
||||||
- Fix blank Superuser fragment under some circumstances
|
- Fix potential crash in superuser fragment
|
||||||
- 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
|
- Preserve searched state in repo fragment
|
||||||
- Fix crashing when pressing fast scrolling button when logs are empty
|
|
||||||
|
@@ -63,8 +63,8 @@
|
|||||||
|
|
||||||
<!--About Activity-->
|
<!--About Activity-->
|
||||||
<string name="app_changelog">Registre de canvis</string>
|
<string name="app_changelog">Registre de canvis</string>
|
||||||
<string name="translators" />
|
<string name="translators">JoanVC100, QuitusAnbu27</string>
|
||||||
<string name="app_translators">JoanVC100, QuitusAnbu27</string>
|
<string name="app_translators">Traductors</string>
|
||||||
|
|
||||||
<!-- System Components, Notifications -->
|
<!-- System Components, Notifications -->
|
||||||
<string name="update_channel">Actualització de Magisk</string>
|
<string name="update_channel">Actualització de Magisk</string>
|
||||||
|
@@ -16,7 +16,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.5.0-beta04'
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
Reference in New Issue
Block a user