feat: Update AuthFlow logic and enhance ChatsListScreen with styled truncated public key display
This commit is contained in:
@@ -26,7 +26,6 @@ fun AuthFlow(
|
|||||||
var currentScreen by remember {
|
var currentScreen by remember {
|
||||||
mutableStateOf(
|
mutableStateOf(
|
||||||
when {
|
when {
|
||||||
hasExistingAccount && accounts.size > 1 -> AuthScreen.SELECT_ACCOUNT
|
|
||||||
hasExistingAccount -> AuthScreen.UNLOCK
|
hasExistingAccount -> AuthScreen.UNLOCK
|
||||||
else -> AuthScreen.WELCOME
|
else -> AuthScreen.WELCOME
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,12 +386,17 @@ fun ChatsListScreen(
|
|||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
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(
|
||||||
text = accountPublicKey,
|
text = truncatedKey,
|
||||||
fontSize = 14.sp,
|
fontSize = 13.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Normal,
|
||||||
color = secondaryTextColor,
|
color = secondaryTextColor,
|
||||||
|
letterSpacing = 0.5.sp,
|
||||||
maxLines = 1
|
maxLines = 1
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -466,8 +471,7 @@ fun ChatsListScreen(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.navigationBarsPadding())
|
Spacer(modifier = Modifier.height(32.dp))
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user