Refactor code structure for improved readability and maintainability

This commit is contained in:
k1ngsterr1
2026-01-31 04:37:23 +05:00
parent 56a9fc4c20
commit 5fdd30b0ae
2 changed files with 851 additions and 762 deletions

View File

@@ -461,6 +461,10 @@ fun ImageAttachment(
fillMaxSize: Boolean = false, fillMaxSize: Boolean = false,
onImageClick: (attachmentId: String) -> Unit = {} onImageClick: (attachmentId: String) -> Unit = {}
) { ) {
Log.d(
TAG,
"🖼️ ImageAttachment: id=${attachment.id}, isOutgoing=$isOutgoing, messageStatus=$messageStatus, showTimeOverlay=$showTimeOverlay"
)
val context = LocalContext.current val context = LocalContext.current
val scope = rememberCoroutineScope() val scope = rememberCoroutineScope()
@@ -845,7 +849,7 @@ fun ImageAttachment(
} }
MessageStatus.DELIVERED -> { MessageStatus.DELIVERED -> {
Icon( Icon(
compose.icons.TablerIcons.Checks, compose.icons.TablerIcons.Check,
contentDescription = null, contentDescription = null,
tint = Color.White.copy(alpha = 0.7f), tint = Color.White.copy(alpha = 0.7f),
modifier = Modifier.size(14.dp) modifier = Modifier.size(14.dp)
@@ -855,7 +859,7 @@ fun ImageAttachment(
Icon( Icon(
compose.icons.TablerIcons.Checks, compose.icons.TablerIcons.Checks,
contentDescription = null, contentDescription = null,
tint = Color(0xFF4FC3F7), tint = Color.White,
modifier = Modifier.size(14.dp) modifier = Modifier.size(14.dp)
) )
} }
@@ -1578,7 +1582,7 @@ fun AvatarAttachment(
} }
MessageStatus.DELIVERED -> { MessageStatus.DELIVERED -> {
Icon( Icon(
compose.icons.TablerIcons.Checks, compose.icons.TablerIcons.Check,
contentDescription = "Delivered", contentDescription = "Delivered",
tint = Color.White.copy(alpha = 0.6f), tint = Color.White.copy(alpha = 0.6f),
modifier = Modifier.size(14.dp) modifier = Modifier.size(14.dp)
@@ -1588,7 +1592,7 @@ fun AvatarAttachment(
Icon( Icon(
compose.icons.TablerIcons.Checks, compose.icons.TablerIcons.Checks,
contentDescription = "Read", contentDescription = "Read",
tint = Color(0xFF4FC3F7), tint = Color.White,
modifier = Modifier.size(14.dp) modifier = Modifier.size(14.dp)
) )
} }