Allowed live animations over cached dialogs list rows.

This commit is contained in:
23rd
2026-07-02 13:46:33 +03:00
parent b3a2434abb
commit ffeb5d41cd
7 changed files with 257 additions and 25 deletions
@@ -385,6 +385,24 @@ int MessageView::countWidth() const {
return result + _textCache.maxWidth();
}
bool MessageView::hasAnimatedContent() const {
if (_textCache.hasCustomEmoji()
|| _textCache.hasSpoilers()
|| _senderCache.hasCustomEmoji()) {
return true;
}
for (const auto &image : _imagesCache) {
if (image.hasSpoiler()) {
return true;
}
}
return false;
}
void MessageView::resetLastPaintGeometry() {
_lastPaintGeometry = QRect();
}
void MessageView::paint(
Painter &p,
const QRect &geometry,
@@ -392,6 +410,7 @@ void MessageView::paint(
if (geometry.isEmpty()) {
return;
}
_lastPaintGeometry = geometry;
p.setFont(st::dialogsTextFont);
p.setPen(context.active
? st::dialogsTextFgActive