mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 20:03:12 +00:00
Allowed live animations over cached dialogs list rows.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user