feat: Update UnlockScreen to display account initials and username for better user identification
This commit is contained in:
@@ -41,6 +41,7 @@ import com.rosetta.messenger.network.ProtocolManager
|
||||
import com.rosetta.messenger.network.ProtocolState
|
||||
import com.rosetta.messenger.ui.chats.getAvatarColor
|
||||
import com.rosetta.messenger.ui.chats.getAvatarText
|
||||
import com.rosetta.messenger.ui.chats.utils.getInitials
|
||||
import com.rosetta.messenger.ui.onboarding.PrimaryBlue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -252,7 +253,7 @@ fun UnlockScreen(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text(
|
||||
text = getAvatarText(selectedAccount!!.publicKey),
|
||||
text = getInitials(selectedAccount!!.name),
|
||||
fontSize = 18.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = avatarColors.textColor
|
||||
@@ -273,8 +274,10 @@ fun UnlockScreen(
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
if (selectedAccount != null) {
|
||||
val displayText = selectedAccount!!.encryptedAccount.username
|
||||
?: selectedAccount!!.publicKey.take(20) + "..."
|
||||
Text(
|
||||
text = selectedAccount!!.publicKey.take(20) + "...",
|
||||
text = displayText,
|
||||
fontSize = 13.sp,
|
||||
color = secondaryTextColor,
|
||||
maxLines = 1,
|
||||
@@ -438,7 +441,7 @@ fun UnlockScreen(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text(
|
||||
text = getAvatarText(account.publicKey),
|
||||
text = getInitials(account.name),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = avatarColors.textColor
|
||||
@@ -458,8 +461,10 @@ fun UnlockScreen(
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
val displayText = account.encryptedAccount.username
|
||||
?: account.publicKey.take(16) + "..."
|
||||
Text(
|
||||
text = account.publicKey.take(16) + "...",
|
||||
text = displayText,
|
||||
fontSize = 12.sp,
|
||||
color = secondaryTextColor,
|
||||
maxLines = 1,
|
||||
|
||||
Reference in New Issue
Block a user