Reset hastInternet to its default value when unregistering callback
At logout, the callback is unregistered, and this var must be true to try to login.
This commit is contained in:
parent
fe731eb352
commit
9d317b68bd
|
@ -69,7 +69,7 @@ class RestartNetworkCallback(val context: Context) : ConnectivityManager.Network
|
|||
Log.d(TAG, "Unregistering ConnectivityManager")
|
||||
connectivityManager.getAndSet(null)?.unregisterNetworkCallback(this)
|
||||
registered.set(false)
|
||||
AppCompanion.hasInternet.set(false)
|
||||
AppCompanion.hasInternet.set(true) // reset default value
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in New Issue