feat: Add animated padding for message list when emoji picker is open
This commit is contained in:
@@ -258,6 +258,13 @@ fun ChatDetailScreen(
|
||||
// 🔥 Высота панели эмодзи = сохранённая высота клавиатуры (минимум 280.dp)
|
||||
val emojiPanelHeight = maxOf(savedKeyboardHeight, 280.dp)
|
||||
|
||||
// 🔥 Анимированный отступ для списка сообщений когда emoji picker открыт
|
||||
val emojiPanelPadding by animateDpAsState(
|
||||
targetValue = if (showEmojiPicker && imeHeight < 50.dp) emojiPanelHeight else 0.dp,
|
||||
animationSpec = tween(120, easing = FastOutSlowInEasing),
|
||||
label = "emojiPanelPadding"
|
||||
)
|
||||
|
||||
// 🔥 Reply/Forward state
|
||||
val replyMessages by viewModel.replyMessages.collectAsState()
|
||||
val hasReply = replyMessages.isNotEmpty()
|
||||
@@ -1049,7 +1056,13 @@ fun ChatDetailScreen(
|
||||
.background(backgroundColor)
|
||||
) {
|
||||
// Список сообщений - занимает всё доступное место
|
||||
Box(modifier = Modifier.weight(1f).fillMaxWidth()) {
|
||||
// 🔥 Добавляем padding снизу когда emoji picker открыт (keyboard avoiding)
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = emojiPanelPadding)
|
||||
) {
|
||||
when {
|
||||
// 🔥 СКЕЛЕТОН - показываем пока загружаются сообщения
|
||||
isLoading -> {
|
||||
|
||||
Reference in New Issue
Block a user