feat: Add username field to AccountInfo and update display logic in SelectAccountScreen
This commit is contained in:
@@ -161,6 +161,7 @@ class MainActivity : ComponentActivity() {
|
||||
AccountInfo(
|
||||
id = account.publicKey,
|
||||
name = displayName,
|
||||
username = account.username,
|
||||
initials = initials,
|
||||
publicKey = account.publicKey
|
||||
)
|
||||
@@ -270,6 +271,7 @@ class MainActivity : ComponentActivity() {
|
||||
AccountInfo(
|
||||
id = acc.publicKey,
|
||||
name = displayName,
|
||||
username = acc.username,
|
||||
initials = initials,
|
||||
publicKey = acc.publicKey
|
||||
)
|
||||
@@ -333,6 +335,7 @@ class MainActivity : ComponentActivity() {
|
||||
AccountInfo(
|
||||
id = acc.publicKey,
|
||||
name = displayName,
|
||||
username = acc.username,
|
||||
initials = initials,
|
||||
publicKey = acc.publicKey
|
||||
)
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.rosetta.messenger.ui.onboarding.PrimaryBlue
|
||||
data class AccountInfo(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val username: String,
|
||||
val initials: String,
|
||||
val publicKey: String
|
||||
)
|
||||
@@ -318,7 +319,7 @@ private fun AccountListItem(
|
||||
)
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
Text(
|
||||
text = "${account.publicKey.take(8)}...${account.publicKey.takeLast(6)}",
|
||||
text = if (account.username.isNotEmpty()) "@${account.username}" else "${account.publicKey.take(8)}...${account.publicKey.takeLast(6)}",
|
||||
fontSize = 13.sp,
|
||||
color = secondaryTextColor,
|
||||
maxLines = 1,
|
||||
|
||||
Reference in New Issue
Block a user