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:
sim 2023-08-31 22:43:27 +02:00
parent fe731eb352
commit 9d317b68bd
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class RestartNetworkCallback(val context: Context) : ConnectivityManager.Network
Log.d(TAG, "Unregistering ConnectivityManager") Log.d(TAG, "Unregistering ConnectivityManager")
connectivityManager.getAndSet(null)?.unregisterNetworkCallback(this) connectivityManager.getAndSet(null)?.unregisterNetworkCallback(this)
registered.set(false) registered.set(false)
AppCompanion.hasInternet.set(false) AppCompanion.hasInternet.set(true) // reset default value
} }
companion object { companion object {