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