feat: Update AuthFlow logic and enhance ChatsListScreen with styled truncated public key display

This commit is contained in:
k1ngsterr1
2026-01-09 02:59:26 +05:00
parent ff242a5c7f
commit 961e89d8ee
2 changed files with 10 additions and 7 deletions

View File

@@ -26,7 +26,6 @@ fun AuthFlow(
var currentScreen by remember {
mutableStateOf(
when {
hasExistingAccount && accounts.size > 1 -> AuthScreen.SELECT_ACCOUNT
hasExistingAccount -> AuthScreen.UNLOCK
else -> AuthScreen.WELCOME
}

View File

@@ -386,12 +386,17 @@ fun ChatsListScreen(
Spacer(modifier = Modifier.height(16.dp))
// Public key instead of account name
// Public key - truncated and styled
val truncatedKey = if (accountPublicKey.length > 12) {
"${accountPublicKey.take(6)}...${accountPublicKey.takeLast(4)}"
} else accountPublicKey
Text(
text = accountPublicKey,
fontSize = 14.sp,
fontWeight = FontWeight.Medium,
text = truncatedKey,
fontSize = 13.sp,
fontWeight = FontWeight.Normal,
color = secondaryTextColor,
letterSpacing = 0.5.sp,
maxLines = 1
)
}
@@ -466,8 +471,7 @@ fun ChatsListScreen(
)
}
Spacer(modifier = Modifier.navigationBarsPadding())
Spacer(modifier = Modifier.height(16.dp))
Spacer(modifier = Modifier.height(32.dp))
}
}
) {