Fix possible glitch in chats list typing animation.

This commit is contained in:
John Preston
2026-05-07 18:32:50 +04:00
parent b292c3069e
commit dfaf378ab8
2 changed files with 14 additions and 12 deletions
@@ -1309,11 +1309,20 @@ QRect RowPainter::SendActionAnimationRect(
const auto nameleft = st.nameLeft;
const auto namewidth = fullWidth - nameleft - st.padding.right();
const auto texttop = st.textTop;
const auto add = st::lineWidth - Ui::Emoji::GetCustomSkipNormal();
const auto height = std::max({
add + rect.height() + add,
add + st::normalFont->height + add,
add + st::dialogsMiniPreviewTop + st::dialogsMiniPreview + add,
st::lineWidth + Ui::Emoji::GetCustomSizeNormal() + st::lineWidth,
});
return QRect(
nameleft + (textUpdated ? 0 : rect.x()),
texttop + rect.y(),
textUpdated ? namewidth : rect.width(),
rect.height());
nameleft + (textUpdated ? (-add) : rect.x()),
texttop + rect.y() - add,
textUpdated ? (add + namewidth + add) : rect.width(),
height);
}
void PaintCollapsedRow(