mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
fix: logout user after account deletion by navigating to login screen (#6159)
This commit is contained in:
parent
7400872f87
commit
41170d81d9
1 changed files with 8 additions and 1 deletions
|
|
@ -28,6 +28,8 @@ import androidx.compose.runtime.mutableStateOf
|
|||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
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.di.ApplicationlessInjection
|
||||
import fr.free.nrw.commons.wikidata.cookies.CommonsCookieJar
|
||||
|
|
@ -85,7 +87,12 @@ class SingleWebViewActivity : ComponentActivity() {
|
|||
url = url,
|
||||
successUrl = successUrl,
|
||||
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()
|
||||
},
|
||||
modifier = Modifier
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue