Compare commits

..

6 Commits

Author SHA1 Message Date
topjohnwu
120bd6cd68 v7.3.2 Changelog 2019-06-21 01:12:50 -07:00
JoanVC100
9aef06d1b8 Fix traductors 2019-06-21 04:00:54 -04:00
topjohnwu
e6e9dd751c Upgrade Kotlin 2019-06-21 00:53:40 -07:00
Viktor De Pasquale
5dd677756f Fixed multiple fetch tasks running at once
Disposing wouldn't help since the shell doesn't appear to handle concurrency well
2019-06-21 00:36:37 -07:00
Viktor De Pasquale
b77c590910 Fixed the searchView being collapsed after searching through it
Now they have their state synced with viewModel to allow continuity
2019-06-21 00:36:37 -07:00
Viktor De Pasquale
7e5f2822ae Fix superuser fragment crashes
Fix superuser screen encountering inconsistencies when refreshing the data rapidly
2019-06-21 00:36:01 -07:00
6 changed files with 44 additions and 14 deletions

View File

@@ -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

View File

@@ -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 {
@@ -84,7 +99,7 @@ class ReposFragment : MagiskFragment<ModuleViewModel, FragmentReposBinding>(),
context.withExternalRW {
onSuccess {
val intent = Intent(activity, ClassMap[DownloadModuleService::class.java])
.putExtra("repo", item).putExtra("install", install)
.putExtra("repo", item).putExtra("install", install)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.startForegroundService(intent)
} else {

View File

@@ -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) {

View File

@@ -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

View File

@@ -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>

View File

@@ -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