feat: update status bar appearance and enhance image viewer page key generation

This commit is contained in:
k1ngsterr1
2026-02-11 17:01:26 +05:00
parent 8c8a651500
commit 0749dea03d
2 changed files with 17 additions and 25 deletions

View File

@@ -226,7 +226,7 @@ fun ChatsListScreen(
androidx.core.view.WindowCompat.getInsetsController(window, view)
// Status bar
insetsController.isAppearanceLightStatusBars = !isDarkTheme
insetsController.isAppearanceLightStatusBars = false
window.statusBarColor = android.graphics.Color.TRANSPARENT
// Navigation bar: показываем только если есть нативные кнопки
@@ -851,11 +851,7 @@ fun ChatsListScreen(
contentDescription =
"Menu",
tint =
textColor
.copy(
alpha =
0.6f
)
Color.White
)
if (topLevelRequestsCount > 0) {
Box(
@@ -865,7 +861,7 @@ fun ChatsListScreen(
.offset(x = 2.dp, y = (-2).dp)
.size(8.dp)
.clip(CircleShape)
.background(PrimaryBlue)
.background(Color(0xFFE53935))
)
}
}
@@ -881,7 +877,7 @@ fun ChatsListScreen(
FontWeight
.Bold,
fontSize = 20.sp,
color = textColor
color = Color.White
)
} else {
// Rosetta title or Connecting animation
@@ -894,12 +890,12 @@ fun ChatsListScreen(
fontSize =
20.sp,
color =
textColor
Color.White
)
} else {
AnimatedDotsText(
baseText = "Connecting",
color = textColor,
color = Color.White,
fontSize = 20.sp,
fontWeight = FontWeight.Bold
)
@@ -934,13 +930,9 @@ fun ChatsListScreen(
ProtocolState
.AUTHENTICATED
)
textColor
.copy(
alpha =
0.6f
)
Color.White
else
textColor
Color.White
.copy(
alpha =
0.5f
@@ -952,15 +944,15 @@ fun ChatsListScreen(
colors =
TopAppBarDefaults.topAppBarColors(
containerColor =
backgroundColor,
Color(0xFF0D8CF4),
scrolledContainerColor =
backgroundColor,
Color(0xFF0D8CF4),
navigationIconContentColor =
textColor,
Color.White,
titleContentColor =
textColor,
Color.White,
actionIconContentColor =
textColor
Color.White
)
)
}
@@ -2880,7 +2872,7 @@ fun RequestsSection(
Modifier
.defaultMinSize(minWidth = 22.dp, minHeight = 22.dp)
.clip(RoundedCornerShape(11.dp))
.background(PrimaryBlue),
.background(Color(0xFFE53935)),
contentAlignment = Alignment.Center
) {
Text(
@@ -2905,7 +2897,7 @@ fun RequestsSection(
Modifier
.defaultMinSize(minWidth = 22.dp, minHeight = 22.dp)
.clip(RoundedCornerShape(11.dp))
.background(PrimaryBlue),
.background(Color(0xFFE53935)),
contentAlignment = Alignment.Center
) {
Text(
@@ -3152,7 +3144,7 @@ fun DrawerMenuItemEnhanced(
Box(
modifier =
Modifier.background(
color = Color(0xFF4A90D9),
color = Color(0xFFE53935),
shape = RoundedCornerShape(10.dp)
)
.padding(horizontal = 8.dp, vertical = 2.dp)

View File

@@ -395,7 +395,7 @@ fun ImageViewerScreen(
}
),
pageSpacing = 30.dp, // Telegram: dp(30) между фото
key = { images.getOrNull(it)?.attachmentId ?: "page_$it" },
key = { page -> "${page}_${images.getOrNull(page)?.attachmentId ?: "empty"}" },
userScrollEnabled = !isAnimating, // Отключаем скролл во время анимации
beyondBoundsPageCount = 1,
flingBehavior = PagerDefaults.flingBehavior(