Improve: should not reload profile on network changed

This commit is contained in:
Kr328
2021-09-11 23:37:54 +08:00
parent e1a35f8b2d
commit b07f70ab0b
9 changed files with 35 additions and 20 deletions

View File

@@ -54,8 +54,6 @@ class ClashService : BaseService() {
true
}
network.onEvent {
config.reload()
false
}
}

View File

@@ -65,8 +65,6 @@ class TunService : VpnService(), CoroutineScope by CoroutineScope(Dispatchers.De
setUnderlyingNetworks(e.network?.let { arrayOf(it) })
}
config.reload()
false
}
}

View File

@@ -73,8 +73,4 @@ class ConfigurationModule(service: Service) : Module<ConfigurationModule.LoadExc
}
}
}
fun reload() {
reload.trySend(Unit)
}
}