You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Don't always refresh on network state change
This commit is contained in:
@@ -104,13 +104,9 @@ class HomeViewModel(
|
||||
ensureEnv()
|
||||
}
|
||||
|
||||
val showTest = false
|
||||
|
||||
fun onTestPressed() = object : ViewEvent(), ActivityExecutor {
|
||||
override fun invoke(activity: UIActivity<*>) {
|
||||
/* Entry point to trigger test events within the app */
|
||||
}
|
||||
}.publish()
|
||||
override fun onNetworkChanged(network: Boolean) {
|
||||
requestRefresh()
|
||||
}
|
||||
|
||||
fun onProgressUpdate(progress: Float, subject: Subject) {
|
||||
if (subject is App)
|
||||
@@ -151,4 +147,10 @@ class HomeViewModel(
|
||||
checkedEnv = true
|
||||
}
|
||||
|
||||
val showTest = false
|
||||
fun onTestPressed() = object : ViewEvent(), ActivityExecutor {
|
||||
override fun invoke(activity: UIActivity<*>) {
|
||||
/* Entry point to trigger test events within the app */
|
||||
}
|
||||
}.publish()
|
||||
}
|
||||
|
||||
@@ -52,6 +52,10 @@ class ModuleViewModel : BaseViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNetworkChanged(network: Boolean) {
|
||||
requestRefresh()
|
||||
}
|
||||
|
||||
private suspend fun loadInstalled() {
|
||||
val installed = LocalModule.installed().map { LocalModuleRvItem(it) }
|
||||
val diff = withContext(Dispatchers.Default) {
|
||||
|
||||
Reference in New Issue
Block a user