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

@@ -212,6 +212,7 @@ fun ChatsListScreen(
isDarkTheme: Boolean,
accountName: String,
accountUsername: String,
accountVerified: Int = 0,
accountPhone: String,
accountPublicKey: String,
accountPrivateKey: String = "",
@@ -864,7 +865,7 @@ fun ChatsListScreen(
fontWeight = FontWeight.Bold,
color = Color.White
)
if (isRosettaOfficial) {
if (accountVerified > 0 || isRosettaOfficial) {
Spacer(
modifier =
Modifier.width(
@@ -872,7 +873,7 @@ fun ChatsListScreen(
)
)
VerifiedBadge(
verified = 1,
verified = if (accountVerified > 0) accountVerified else 1,
size = 15,
badgeTint = Color(0xFFACD2F9)
)
@@ -1148,6 +1149,21 @@ fun ChatsListScreen(
}
)
// 🔄 Sync logs
DrawerMenuItemEnhanced(
painter = painterResource(id = R.drawable.files_document),
text = "Sync Logs",
iconColor = menuIconColor,
textColor = menuTextColor,
onClick = {
scope.launch {
drawerState.close()
kotlinx.coroutines.delay(100)
showSduLogs = true
}
}
)
}
// ═══════════════════════════════════════════════════════════

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
)