Add delete account feature to mobile app
- DELETE /api/auth/account/ API call in AuthApi + APILayer - authProvider field on User model for email vs social auth detection - DeleteAccountDialog with password (email) or "type DELETE" (social) confirmation - Red "Delete Account" card on ProfileScreen - Navigation wired in App.kt (clears data, returns to login) - 10 i18n strings in strings.xml - ViewModel unit tests for delete account state
This commit is contained in:
@@ -665,6 +665,15 @@ fun App(
|
||||
popUpTo<ProfileRoute> { inclusive = true }
|
||||
}
|
||||
},
|
||||
onAccountDeleted = {
|
||||
// Clear token and lookups on account deletion
|
||||
DataManager.clear()
|
||||
isLoggedIn = false
|
||||
isVerified = false
|
||||
navController.navigate(LoginRoute) {
|
||||
popUpTo<ProfileRoute> { inclusive = true }
|
||||
}
|
||||
},
|
||||
onNavigateToNotificationPreferences = {
|
||||
navController.navigate(NotificationPreferencesRoute)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user