SettingsViewModel.logout() and deleteAccount() each called authRepository.logout() directly before flipping the state flag that drives the screen's LaunchedEffect -> onLogout callback -> NavHostViewModel.logout(), which invokes authRepository.logout() again. Each redundant call fires a POST /api/auth/logout that 401s (tokens already gone) and re-runs session cleanup; with the planned full-wipe change that duplication becomes actively harmful. Collapse SettingsViewModel.logout() to a single state update, and drop the direct authRepository.logout() call from the deleteAccount success branch. NavHostViewModel.logout() remains the single source of truth for the cleanup side of the flow. |
||
|---|---|---|
| .. | ||
| agents | ||
| auth | ||
| chat | ||
| conversations | ||
| files | ||
| settings | ||