feat: Update color handling for typing indicator and verified badge in dark theme
This commit is contained in:
@@ -1142,13 +1142,10 @@ fun ChatDetailScreen(
|
||||
isSavedMessages ->
|
||||
Color.White.copy(alpha = 0.7f)
|
||||
isOnline ->
|
||||
Color(
|
||||
0xFF7FE084
|
||||
) // Зелёный когда онлайн (светлый на синем фоне)
|
||||
if (isDarkTheme) Color(0xFF7FE084)
|
||||
else Color.White.copy(alpha = 0.7f)
|
||||
else ->
|
||||
Color.White.copy(alpha = 0.7f) // Белый полупрозрачный
|
||||
// для
|
||||
// offline
|
||||
Color.White.copy(alpha = 0.7f)
|
||||
},
|
||||
maxLines = 1
|
||||
)
|
||||
|
||||
@@ -217,7 +217,7 @@ fun DateHeader(dateText: String, secondaryTextColor: Color) {
|
||||
*/
|
||||
@Composable
|
||||
fun TypingIndicator(isDarkTheme: Boolean) {
|
||||
val typingColor = Color(0xFF54A9EB)
|
||||
val typingColor = if (isDarkTheme) Color(0xFF54A9EB) else Color.White.copy(alpha = 0.7f)
|
||||
val infiniteTransition = rememberInfiniteTransition(label = "typing")
|
||||
|
||||
// Each dot animates through a 0→1→0 cycle, staggered by 150 ms
|
||||
|
||||
@@ -1026,7 +1026,30 @@ fun extractImagesFromMessages(
|
||||
)
|
||||
} ?: emptyList()
|
||||
|
||||
mainImages + replyImages
|
||||
// Also include images from forwarded messages
|
||||
val forwardedImages = message.forwardedMessages.flatMap { fwd ->
|
||||
fwd.attachments
|
||||
.filter { it.type == AttachmentType.IMAGE }
|
||||
.map { attachment ->
|
||||
val fwdSenderKey = fwd.senderPublicKey.ifEmpty {
|
||||
if (fwd.isFromMe) currentPublicKey else opponentPublicKey
|
||||
}
|
||||
ViewableImage(
|
||||
attachmentId = attachment.id,
|
||||
preview = attachment.preview,
|
||||
blob = attachment.blob,
|
||||
chachaKey = message.chachaKey,
|
||||
senderPublicKey = fwdSenderKey,
|
||||
senderName = fwd.senderName,
|
||||
timestamp = message.timestamp,
|
||||
width = attachment.width,
|
||||
height = attachment.height,
|
||||
caption = fwd.text
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
mainImages + replyImages + forwardedImages
|
||||
}
|
||||
.filter { seenIds.add(it.attachmentId) }
|
||||
.sortedBy { it.timestamp }
|
||||
|
||||
@@ -1935,7 +1935,8 @@ private fun CollapsingOtherProfileHeader(
|
||||
VerifiedBadge(
|
||||
verified = if (verified > 0) verified else 1,
|
||||
size = (nameFontSize.value * 0.8f).toInt(),
|
||||
isDarkTheme = isDarkTheme
|
||||
isDarkTheme = isDarkTheme,
|
||||
badgeTint = if (isDarkTheme) null else Color.White
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user