feat: update status bar appearance and enhance image viewer page key generation
This commit is contained in:
@@ -226,7 +226,7 @@ fun ChatsListScreen(
|
|||||||
androidx.core.view.WindowCompat.getInsetsController(window, view)
|
androidx.core.view.WindowCompat.getInsetsController(window, view)
|
||||||
|
|
||||||
// Status bar
|
// Status bar
|
||||||
insetsController.isAppearanceLightStatusBars = !isDarkTheme
|
insetsController.isAppearanceLightStatusBars = false
|
||||||
window.statusBarColor = android.graphics.Color.TRANSPARENT
|
window.statusBarColor = android.graphics.Color.TRANSPARENT
|
||||||
|
|
||||||
// Navigation bar: показываем только если есть нативные кнопки
|
// Navigation bar: показываем только если есть нативные кнопки
|
||||||
@@ -851,11 +851,7 @@ fun ChatsListScreen(
|
|||||||
contentDescription =
|
contentDescription =
|
||||||
"Menu",
|
"Menu",
|
||||||
tint =
|
tint =
|
||||||
textColor
|
Color.White
|
||||||
.copy(
|
|
||||||
alpha =
|
|
||||||
0.6f
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
if (topLevelRequestsCount > 0) {
|
if (topLevelRequestsCount > 0) {
|
||||||
Box(
|
Box(
|
||||||
@@ -865,7 +861,7 @@ fun ChatsListScreen(
|
|||||||
.offset(x = 2.dp, y = (-2).dp)
|
.offset(x = 2.dp, y = (-2).dp)
|
||||||
.size(8.dp)
|
.size(8.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(PrimaryBlue)
|
.background(Color(0xFFE53935))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -881,7 +877,7 @@ fun ChatsListScreen(
|
|||||||
FontWeight
|
FontWeight
|
||||||
.Bold,
|
.Bold,
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
color = textColor
|
color = Color.White
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// Rosetta title or Connecting animation
|
// Rosetta title or Connecting animation
|
||||||
@@ -894,12 +890,12 @@ fun ChatsListScreen(
|
|||||||
fontSize =
|
fontSize =
|
||||||
20.sp,
|
20.sp,
|
||||||
color =
|
color =
|
||||||
textColor
|
Color.White
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
AnimatedDotsText(
|
AnimatedDotsText(
|
||||||
baseText = "Connecting",
|
baseText = "Connecting",
|
||||||
color = textColor,
|
color = Color.White,
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
fontWeight = FontWeight.Bold
|
fontWeight = FontWeight.Bold
|
||||||
)
|
)
|
||||||
@@ -934,13 +930,9 @@ fun ChatsListScreen(
|
|||||||
ProtocolState
|
ProtocolState
|
||||||
.AUTHENTICATED
|
.AUTHENTICATED
|
||||||
)
|
)
|
||||||
textColor
|
Color.White
|
||||||
.copy(
|
|
||||||
alpha =
|
|
||||||
0.6f
|
|
||||||
)
|
|
||||||
else
|
else
|
||||||
textColor
|
Color.White
|
||||||
.copy(
|
.copy(
|
||||||
alpha =
|
alpha =
|
||||||
0.5f
|
0.5f
|
||||||
@@ -952,15 +944,15 @@ fun ChatsListScreen(
|
|||||||
colors =
|
colors =
|
||||||
TopAppBarDefaults.topAppBarColors(
|
TopAppBarDefaults.topAppBarColors(
|
||||||
containerColor =
|
containerColor =
|
||||||
backgroundColor,
|
Color(0xFF0D8CF4),
|
||||||
scrolledContainerColor =
|
scrolledContainerColor =
|
||||||
backgroundColor,
|
Color(0xFF0D8CF4),
|
||||||
navigationIconContentColor =
|
navigationIconContentColor =
|
||||||
textColor,
|
Color.White,
|
||||||
titleContentColor =
|
titleContentColor =
|
||||||
textColor,
|
Color.White,
|
||||||
actionIconContentColor =
|
actionIconContentColor =
|
||||||
textColor
|
Color.White
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -2880,7 +2872,7 @@ fun RequestsSection(
|
|||||||
Modifier
|
Modifier
|
||||||
.defaultMinSize(minWidth = 22.dp, minHeight = 22.dp)
|
.defaultMinSize(minWidth = 22.dp, minHeight = 22.dp)
|
||||||
.clip(RoundedCornerShape(11.dp))
|
.clip(RoundedCornerShape(11.dp))
|
||||||
.background(PrimaryBlue),
|
.background(Color(0xFFE53935)),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
@@ -2905,7 +2897,7 @@ fun RequestsSection(
|
|||||||
Modifier
|
Modifier
|
||||||
.defaultMinSize(minWidth = 22.dp, minHeight = 22.dp)
|
.defaultMinSize(minWidth = 22.dp, minHeight = 22.dp)
|
||||||
.clip(RoundedCornerShape(11.dp))
|
.clip(RoundedCornerShape(11.dp))
|
||||||
.background(PrimaryBlue),
|
.background(Color(0xFFE53935)),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
@@ -3152,7 +3144,7 @@ fun DrawerMenuItemEnhanced(
|
|||||||
Box(
|
Box(
|
||||||
modifier =
|
modifier =
|
||||||
Modifier.background(
|
Modifier.background(
|
||||||
color = Color(0xFF4A90D9),
|
color = Color(0xFFE53935),
|
||||||
shape = RoundedCornerShape(10.dp)
|
shape = RoundedCornerShape(10.dp)
|
||||||
)
|
)
|
||||||
.padding(horizontal = 8.dp, vertical = 2.dp)
|
.padding(horizontal = 8.dp, vertical = 2.dp)
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ fun ImageViewerScreen(
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
pageSpacing = 30.dp, // Telegram: dp(30) между фото
|
pageSpacing = 30.dp, // Telegram: dp(30) между фото
|
||||||
key = { images.getOrNull(it)?.attachmentId ?: "page_$it" },
|
key = { page -> "${page}_${images.getOrNull(page)?.attachmentId ?: "empty"}" },
|
||||||
userScrollEnabled = !isAnimating, // Отключаем скролл во время анимации
|
userScrollEnabled = !isAnimating, // Отключаем скролл во время анимации
|
||||||
beyondBoundsPageCount = 1,
|
beyondBoundsPageCount = 1,
|
||||||
flingBehavior = PagerDefaults.flingBehavior(
|
flingBehavior = PagerDefaults.flingBehavior(
|
||||||
|
|||||||
Reference in New Issue
Block a user