fix: Update background color in SwipeableDialogItem and RequestsScreen for improved UI consistency
This commit is contained in:
@@ -857,7 +857,7 @@ fun ChatsListScreen(
|
||||
containerColor = backgroundColor
|
||||
) { paddingValues ->
|
||||
// Main content
|
||||
Box(modifier = Modifier.fillMaxSize().padding(paddingValues)) {
|
||||
Box(modifier = Modifier.fillMaxSize().background(backgroundColor).padding(paddingValues)) {
|
||||
// <20> Используем комбинированное состояние для атомарного
|
||||
// обновления
|
||||
// Это предотвращает "дергание" UI когда dialogs и requests
|
||||
@@ -925,12 +925,13 @@ fun ChatsListScreen(
|
||||
val dividerColor =
|
||||
if (isDarkTheme) Color(0xFF3A3A3A)
|
||||
else Color(0xFFE8E8E8)
|
||||
val listBackgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFF2F2F7)
|
||||
// 🔥 Берем dialogs из chatsState для
|
||||
// консистентности
|
||||
val currentDialogs = chatsState.dialogs
|
||||
|
||||
LazyColumn(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
modifier = Modifier.fillMaxSize().background(listBackgroundColor)
|
||||
) {
|
||||
if (requestsCount > 0) {
|
||||
item(
|
||||
@@ -1173,13 +1174,14 @@ fun ChatsListScreen(
|
||||
@Composable
|
||||
private fun EmptyChatsState(isDarkTheme: Boolean, modifier: Modifier = Modifier) {
|
||||
val secondaryTextColor = if (isDarkTheme) Color(0xFF8E8E93) else Color(0xFF666666)
|
||||
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFF2F2F7)
|
||||
|
||||
// Lottie animation
|
||||
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.letter))
|
||||
val progress by animateLottieCompositionAsState(composition = composition, iterations = 1)
|
||||
|
||||
Column(
|
||||
modifier = modifier.fillMaxSize(),
|
||||
modifier = modifier.fillMaxSize().background(backgroundColor),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
@@ -1472,7 +1474,7 @@ fun SwipeableDialogItem(
|
||||
onBlock: () -> Unit = {},
|
||||
onUnblock: () -> Unit = {}
|
||||
) {
|
||||
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFFFFFFF)
|
||||
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFF2F2F7)
|
||||
var offsetX by remember { mutableStateOf(0f) }
|
||||
val swipeWidthDp = if (isSavedMessages) 80.dp else 160.dp
|
||||
val density = androidx.compose.ui.platform.LocalDensity.current
|
||||
@@ -1489,7 +1491,7 @@ fun SwipeableDialogItem(
|
||||
label = "swipeOffset"
|
||||
)
|
||||
|
||||
Box(modifier = Modifier.fillMaxWidth().height(itemHeight).clipToBounds()) {
|
||||
Box(modifier = Modifier.fillMaxWidth().height(itemHeight).background(backgroundColor).clipToBounds()) {
|
||||
// 1. КНОПКИ - позиционированы справа, всегда видны при свайпе
|
||||
Row(
|
||||
modifier =
|
||||
@@ -2036,7 +2038,7 @@ fun RequestsScreen(
|
||||
onBack: () -> Unit,
|
||||
onRequestClick: (DialogUiModel) -> Unit
|
||||
) {
|
||||
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFFFFFFF)
|
||||
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFF2F2F7)
|
||||
val dividerColor = if (isDarkTheme) Color(0xFF3A3A3A) else Color(0xFFE8E8E8)
|
||||
|
||||
Column(modifier = Modifier.fillMaxSize().background(backgroundColor)) {
|
||||
|
||||
Reference in New Issue
Block a user