fix: Complete the disconnection before redirecting to the login screen
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
Reviewed-on: https://gitea.amine-louveau.fr/Louvorg/ReaderForSelfoss-multiplatform/pulls/129
This commit is contained in:
commit
9b23053b66
@ -36,6 +36,7 @@ import com.ashokvarma.bottomnavigation.TextBadgeItem
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.kodein.di.DIAware
|
||||
import org.kodein.di.android.closestDI
|
||||
import org.kodein.di.instance
|
||||
@ -588,12 +589,12 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
|
||||
return true
|
||||
}
|
||||
R.id.action_disconnect -> {
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
runBlocking {
|
||||
repository.logout()
|
||||
}
|
||||
this@HomeActivity.finish()
|
||||
val intent = Intent(this, LoginActivity::class.java)
|
||||
this.startActivity(intent)
|
||||
finish()
|
||||
return true
|
||||
}
|
||||
R.id.action_settings -> {
|
||||
|
Loading…
Reference in New Issue
Block a user