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:
Trey T
2026-03-26 10:41:17 -05:00
parent 2e5dbaea50
commit af45588503
9 changed files with 352 additions and 0 deletions

View File

@@ -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)
},