mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix possible glitch in chats list typing animation.
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -387,17 +387,10 @@ bool SendActionPainter::updateNeedsAnimating(crl::time now, bool force) {
|
||||
if (force
|
||||
|| sendActionChanged
|
||||
|| (sendActionResult && !anim::Disabled())) {
|
||||
const auto left = 0;
|
||||
const auto top = Ui::Emoji::GetCustomSkipNormal();
|
||||
const auto width = _sendActionAnimation.width() + _animationLeft;
|
||||
const auto height = std::max({
|
||||
st::normalFont->height - top,
|
||||
st::dialogsMiniPreviewTop + st::dialogsMiniPreview - top,
|
||||
Ui::Emoji::GetCustomSizeNormal(),
|
||||
});
|
||||
_history->peer->owner().sendActionManager().updateAnimation({
|
||||
_topic ? ((Data::Thread*)_topic) : _history,
|
||||
{ left, top, width, height },
|
||||
{ 0, 0, width, st::normalFont->height },
|
||||
(force || sendActionChanged)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user