Сделал белым сообщение о входе в группу в темной теме и на обоях
This commit is contained in:
@@ -2587,6 +2587,9 @@ fun ChatDetailScreen(
|
||||
message,
|
||||
isDarkTheme =
|
||||
isDarkTheme,
|
||||
hasWallpaper =
|
||||
chatWallpaperResId !=
|
||||
null,
|
||||
isSystemSafeChat =
|
||||
isSystemAccount,
|
||||
isSelectionMode =
|
||||
|
||||
@@ -287,6 +287,7 @@ fun TypingIndicator(isDarkTheme: Boolean) {
|
||||
fun MessageBubble(
|
||||
message: ChatMessage,
|
||||
isDarkTheme: Boolean,
|
||||
hasWallpaper: Boolean = false,
|
||||
isSystemSafeChat: Boolean = false,
|
||||
isSelectionMode: Boolean = false,
|
||||
showTail: Boolean = true,
|
||||
@@ -408,7 +409,8 @@ fun MessageBubble(
|
||||
if (isGroupActionSystemMessage) {
|
||||
GroupActionSystemMessage(
|
||||
text = groupActionSystemText.orEmpty(),
|
||||
isDarkTheme = isDarkTheme
|
||||
isDarkTheme = isDarkTheme,
|
||||
hasWallpaper = hasWallpaper
|
||||
)
|
||||
return
|
||||
}
|
||||
@@ -1293,8 +1295,8 @@ private fun resolveGroupActionSystemText(text: String): String? {
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun GroupActionSystemMessage(text: String, isDarkTheme: Boolean) {
|
||||
val successColor = if (isDarkTheme) Color(0xFF7EE787) else Color(0xFF2E7D32)
|
||||
private fun GroupActionSystemMessage(text: String, isDarkTheme: Boolean, hasWallpaper: Boolean) {
|
||||
val messageColor = if (isDarkTheme || hasWallpaper) Color.White else Color(0xFF2E7D32)
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(vertical = 6.dp),
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
@@ -1302,7 +1304,7 @@ private fun GroupActionSystemMessage(text: String, isDarkTheme: Boolean) {
|
||||
) {
|
||||
Text(
|
||||
text = text,
|
||||
color = successColor,
|
||||
color = messageColor,
|
||||
fontSize = 12.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
maxLines = 1,
|
||||
|
||||
Reference in New Issue
Block a user