Добавлено автоматическое прокручивание к новым сообщениям и кнопка "Прокрутить вниз" в ChatDetailScreen
This commit is contained in:
@@ -1156,7 +1156,8 @@ fun ChatDetailScreen(
|
|||||||
color = Color.White,
|
color = Color.White,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = android.text.TextUtils.TruncateAt.END,
|
overflow = android.text.TextUtils.TruncateAt.END,
|
||||||
enableLinks = false
|
enableLinks = false,
|
||||||
|
minHeightMultiplier = 1.1f
|
||||||
)
|
)
|
||||||
if (!isSavedMessages &&
|
if (!isSavedMessages &&
|
||||||
!isGroupChat &&
|
!isGroupChat &&
|
||||||
|
|||||||
@@ -358,13 +358,14 @@ fun AppleEmojiText(
|
|||||||
enableMentions: Boolean = false,
|
enableMentions: Boolean = false,
|
||||||
onMentionClick: ((String) -> Unit)? = null,
|
onMentionClick: ((String) -> Unit)? = null,
|
||||||
onClick: (() -> Unit)? = null, // 🔥 Обычный tap (selection mode в MessageBubble)
|
onClick: (() -> Unit)? = null, // 🔥 Обычный tap (selection mode в MessageBubble)
|
||||||
onLongClick: (() -> Unit)? = null // 🔥 Callback для long press (selection в MessageBubble)
|
onLongClick: (() -> Unit)? = null, // 🔥 Callback для long press (selection в MessageBubble)
|
||||||
|
minHeightMultiplier: Float = 1.5f
|
||||||
) {
|
) {
|
||||||
val fontSizeValue = if (fontSize == androidx.compose.ui.unit.TextUnit.Unspecified) 15f
|
val fontSizeValue = if (fontSize == androidx.compose.ui.unit.TextUnit.Unspecified) 15f
|
||||||
else fontSize.value
|
else fontSize.value
|
||||||
|
|
||||||
// Минимальная высота для корректного отображения emoji
|
// Минимальная высота для корректного отображения emoji
|
||||||
val minHeight = (fontSizeValue * 1.5).toInt()
|
val minHeight = (fontSizeValue * minHeightMultiplier).toInt()
|
||||||
|
|
||||||
// Преобразуем FontWeight в Android typeface style
|
// Преобразуем FontWeight в Android typeface style
|
||||||
val typefaceStyle = when (fontWeight) {
|
val typefaceStyle = when (fontWeight) {
|
||||||
|
|||||||
Reference in New Issue
Block a user