feat: Add account verification status handling in MainScreen, ChatsListScreen, and ProfileScreen

This commit is contained in:
2026-02-26 20:32:05 +05:00
parent 388d279ea9
commit 829e19364a
6 changed files with 64 additions and 46 deletions

View File

@@ -270,6 +270,7 @@ fun ProfileScreen(
isDarkTheme: Boolean,
accountName: String,
accountUsername: String,
accountVerified: Int = 0,
accountPublicKey: String,
accountPrivateKeyHash: String,
onBack: () -> Unit,
@@ -921,6 +922,7 @@ fun ProfileScreen(
CollapsingProfileHeader(
name = editedName.ifBlank { accountPublicKey.take(10) },
username = editedUsername,
verified = accountVerified,
publicKey = accountPublicKey,
avatarColors = avatarColors,
collapseProgress = collapseProgress,
@@ -1069,6 +1071,7 @@ fun ProfileScreen(
private fun CollapsingProfileHeader(
name: String,
username: String,
verified: Int = 0,
publicKey: String,
avatarColors: AvatarColors,
collapseProgress: Float,
@@ -1397,10 +1400,10 @@ private fun CollapsingProfileHeader(
modifier = Modifier.widthIn(max = 220.dp),
textAlign = TextAlign.Center
)
if (isRosettaOfficial) {
if (verified > 0 || isRosettaOfficial) {
Spacer(modifier = Modifier.width(4.dp))
VerifiedBadge(
verified = 2,
verified = if (verified > 0) verified else 2,
size = (nameFontSize.value * 0.8f).toInt(),
isDarkTheme = isDarkTheme
)