mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-01 15:23:54 +01:00
fix: logout user after account deletion by navigating to login screen
This commit is contained in:
parent
78666ccbde
commit
aa48531fd4
1 changed files with 8 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.viewinterop.AndroidView
|
import androidx.compose.ui.viewinterop.AndroidView
|
||||||
|
import fr.free.nrw.commons.CommonsApplication
|
||||||
|
import fr.free.nrw.commons.CommonsApplication.ActivityLogoutListener
|
||||||
import fr.free.nrw.commons.R
|
import fr.free.nrw.commons.R
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
|
|
@ -72,7 +74,12 @@ class SingleWebViewActivity : ComponentActivity() {
|
||||||
url = url,
|
url = url,
|
||||||
successUrl = successUrl,
|
successUrl = successUrl,
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
// TODO Redirect the user to login screen like we do when the user logout's
|
//Redirect the user to login screen like we do when the user logout's
|
||||||
|
val app = applicationContext as CommonsApplication
|
||||||
|
app.clearApplicationData(
|
||||||
|
applicationContext,
|
||||||
|
ActivityLogoutListener(activity = this, ctx = applicationContext)
|
||||||
|
)
|
||||||
finish()
|
finish()
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue