Фикс UI: ограничение аккаунтов в сайдбаре и корректное позиционирование кнопки записи
All checks were successful
Android Kernel Build / build (push) Successful in 21m19s

This commit is contained in:
2026-04-15 22:00:07 +05:00
parent 38ae9bca66
commit 45134665b3
2 changed files with 8 additions and 5 deletions

View File

@@ -1098,8 +1098,8 @@ fun ChatsListScreen(
exit = shrinkVertically(animationSpec = tween(250)) + fadeOut(animationSpec = tween(200))
) {
Column(modifier = Modifier.fillMaxWidth()) {
// All accounts list (max 5 like Telegram sidebar behavior)
allAccounts.take(5).forEach { account ->
// All accounts list (limit to 3 in expanded sidebar)
allAccounts.take(3).forEach { account ->
val isCurrentAccount =
account.publicKey ==
effectiveCurrentPublicKey

View File

@@ -2285,6 +2285,7 @@ fun MessageInputBar(
}
}
androidx.compose.animation.AnimatedVisibility(
modifier = Modifier.graphicsLayer { clip = false },
visibleState = recordingPanelTransitionState,
// Telegram-like smooth dissolve without any vertical resize.
enter = fadeIn(tween(durationMillis = 170, easing = LinearOutSlowInEasing)),
@@ -2300,9 +2301,11 @@ fun MessageInputBar(
// Telegram-like proportions: large button that does not dominate the panel.
val recordingActionVisualScale = 1.42f // 40dp -> ~57dp visual size
val recordingActionInset = 34.dp
// Keep the scaled circle fully on-screen (no right-edge clipping).
val recordingActionOverflowX = 0.dp
val recordingActionOverflowY = 0.dp
// Keep scaled circle safely inside screen bounds (right/bottom).
val recordingActionVisualOverflow =
(recordingActionButtonBaseSize * (recordingActionVisualScale - 1f)) / 2f
val recordingActionOverflowX = -recordingActionVisualOverflow + 2.dp
val recordingActionOverflowY = -recordingActionVisualOverflow + 2.dp
val voiceLevel = remember(voiceWaves) { voiceWaves.lastOrNull() ?: 0f }
val cancelAnimProgress by animateFloatAsState(
targetValue = if (isVoiceCancelAnimating || holdCancelVisualUntilHidden) 1f else 0f,