Fix comment

pull/1837/head
Don Turner 3 years ago
parent ed4283b99d
commit b0e01316c7

@ -38,11 +38,11 @@ class ConnectivityManagerNetworkMonitor @Inject constructor(
override val isOnline: Flow<Boolean> = callbackFlow { override val isOnline: Flow<Boolean> = callbackFlow {
val connectivityManager = context.getSystemService<ConnectivityManager>() val connectivityManager = context.getSystemService<ConnectivityManager>()
/* /**
The callback's methods are invoked on changes to *any* network, not just the active * The callback's methods are invoked on changes to *any* network, not just the active
network. So to check for network connectivity, one must query the active network of the * network. So to check for network connectivity, one must query the active network of the
ConnectivityManager. * ConnectivityManager.
*/ */
val callback = object : NetworkCallback() { val callback = object : NetworkCallback() {
override fun onAvailable(network: Network) { override fun onAvailable(network: Network) {
channel.trySend(connectivityManager.isCurrentlyConnected()) channel.trySend(connectivityManager.isCurrentlyConnected())

Loading…
Cancel
Save