added the network check
This commit is contained in:
@@ -50,7 +50,7 @@ class NetworkMonitor @Inject constructor(
|
|||||||
fun stopMonitoring() {
|
fun stopMonitoring() {
|
||||||
try {
|
try {
|
||||||
connectivityManager.unregisterNetworkCallback(networkCallback)
|
connectivityManager.unregisterNetworkCallback(networkCallback)
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (_: IllegalArgumentException) {
|
||||||
}
|
}
|
||||||
networkScope.cancel()
|
networkScope.cancel()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user