mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-22 13:26:09 +03:00
Fix: fix network observer
This commit is contained in:
parent
a5ba4b4d23
commit
d20f19c08f
@ -41,10 +41,10 @@ class NetworkObserveModule(service: Service) :
|
|||||||
private var network: Network? = null
|
private var network: Network? = null
|
||||||
|
|
||||||
override fun onAvailable(network: Network) {
|
override fun onAvailable(network: Network) {
|
||||||
this.network = network
|
|
||||||
|
|
||||||
if (this.network != network)
|
if (this.network != network)
|
||||||
networks.trySend(network)
|
networks.trySend(network)
|
||||||
|
|
||||||
|
this.network = network
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLinkPropertiesChanged(network: Network, linkProperties: LinkProperties) {
|
override fun onLinkPropertiesChanged(network: Network, linkProperties: LinkProperties) {
|
||||||
|
Loading…
Reference in New Issue
Block a user