feat: Implement forced logout on app restart and prioritize last logged public key in UnlockScreen

This commit is contained in:
k1ngsterr1
2026-01-09 03:56:48 +05:00
parent eab7cf35fd
commit b6786cea05
4 changed files with 25 additions and 7 deletions

View File

@@ -53,7 +53,9 @@ class MainActivity : ComponentActivity() {
var accountInfoList by remember { mutableStateOf<List<AccountInfo>>(emptyList()) }
// Check for existing accounts and build AccountInfo list
// Also force logout so user always sees unlock screen on app restart
LaunchedEffect(Unit) {
accountManager.logout() // Always start logged out
val accounts = accountManager.getAllAccounts()
hasExistingAccount = accounts.isNotEmpty()
accountInfoList = accounts.map { account ->