feat: Always display timestamp in ImageAttachment component, regardless of download status
This commit is contained in:
@@ -292,65 +292,63 @@ fun ImageAttachment(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Время в правом нижнем углу (только если изображение загружено)
|
// Время в правом нижнем углу (всегда показываем, даже когда фото blurred)
|
||||||
if (downloadStatus == DownloadStatus.DOWNLOADED) {
|
Box(
|
||||||
Box(
|
modifier = Modifier
|
||||||
modifier = Modifier
|
.align(Alignment.BottomEnd)
|
||||||
.align(Alignment.BottomEnd)
|
.padding(8.dp)
|
||||||
.padding(8.dp)
|
.background(
|
||||||
.background(
|
Color.Black.copy(alpha = 0.5f),
|
||||||
Color.Black.copy(alpha = 0.5f),
|
shape = RoundedCornerShape(10.dp)
|
||||||
shape = RoundedCornerShape(10.dp)
|
)
|
||||||
)
|
.padding(horizontal = 6.dp, vertical = 3.dp)
|
||||||
.padding(horizontal = 6.dp, vertical = 3.dp)
|
) {
|
||||||
|
Row(
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
horizontalArrangement = Arrangement.spacedBy(2.dp)
|
||||||
) {
|
) {
|
||||||
Row(
|
Text(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
text = timeFormat.format(timestamp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(2.dp)
|
color = Color.White,
|
||||||
) {
|
fontSize = 11.sp,
|
||||||
Text(
|
fontWeight = FontWeight.Medium
|
||||||
text = timeFormat.format(timestamp),
|
)
|
||||||
color = Color.White,
|
if (isOutgoing) {
|
||||||
fontSize = 11.sp,
|
// Статус доставки для исходящих
|
||||||
fontWeight = FontWeight.Medium
|
when (messageStatus) {
|
||||||
)
|
MessageStatus.SENDING -> {
|
||||||
if (isOutgoing) {
|
Icon(
|
||||||
// Статус доставки для исходящих
|
compose.icons.TablerIcons.Clock,
|
||||||
when (messageStatus) {
|
contentDescription = null,
|
||||||
MessageStatus.SENDING -> {
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
Icon(
|
modifier = Modifier.size(14.dp)
|
||||||
compose.icons.TablerIcons.Clock,
|
)
|
||||||
contentDescription = null,
|
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
|
||||||
modifier = Modifier.size(14.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
MessageStatus.SENT -> {
|
|
||||||
Icon(
|
|
||||||
compose.icons.TablerIcons.Check,
|
|
||||||
contentDescription = null,
|
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
|
||||||
modifier = Modifier.size(14.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
MessageStatus.DELIVERED -> {
|
|
||||||
Icon(
|
|
||||||
compose.icons.TablerIcons.Checks,
|
|
||||||
contentDescription = null,
|
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
|
||||||
modifier = Modifier.size(14.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
MessageStatus.READ -> {
|
|
||||||
Icon(
|
|
||||||
compose.icons.TablerIcons.Checks,
|
|
||||||
contentDescription = null,
|
|
||||||
tint = Color(0xFF4FC3F7),
|
|
||||||
modifier = Modifier.size(14.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
else -> {}
|
|
||||||
}
|
}
|
||||||
|
MessageStatus.SENT -> {
|
||||||
|
Icon(
|
||||||
|
compose.icons.TablerIcons.Check,
|
||||||
|
contentDescription = null,
|
||||||
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
|
modifier = Modifier.size(14.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
MessageStatus.DELIVERED -> {
|
||||||
|
Icon(
|
||||||
|
compose.icons.TablerIcons.Checks,
|
||||||
|
contentDescription = null,
|
||||||
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
|
modifier = Modifier.size(14.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
MessageStatus.READ -> {
|
||||||
|
Icon(
|
||||||
|
compose.icons.TablerIcons.Checks,
|
||||||
|
contentDescription = null,
|
||||||
|
tint = Color(0xFF4FC3F7),
|
||||||
|
modifier = Modifier.size(14.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user