mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Colorize emoji in text color correctly.
This commit is contained in:
@@ -327,6 +327,7 @@ void DocumentData::setattributes(
|
||||
const QVector<MTPDocumentAttribute> &attributes) {
|
||||
_flags &= ~(Flag::ImageType
|
||||
| Flag::HasAttachedStickers
|
||||
| Flag::UseTextColor
|
||||
| kStreamingSupportedMask);
|
||||
_flags |= kStreamingSupportedUnknown;
|
||||
|
||||
@@ -375,6 +376,9 @@ void DocumentData::setattributes(
|
||||
} else {
|
||||
_flags |= Flag::PremiumSticker;
|
||||
}
|
||||
if (data.is_text_color()) {
|
||||
_flags |= Flag::UseTextColor;
|
||||
}
|
||||
UpdateStickerSetIdentifier(info->set, data.vstickerset());
|
||||
}
|
||||
}, [&](const MTPDdocumentAttributeVideo &data) {
|
||||
@@ -555,6 +559,10 @@ bool DocumentData::isPremiumEmoji() const {
|
||||
return info && info->setType == Data::StickersType::Emoji;
|
||||
}
|
||||
|
||||
bool DocumentData::emojiUsesTextColor() const {
|
||||
return (_flags & Flag::UseTextColor);
|
||||
}
|
||||
|
||||
bool DocumentData::hasThumbnail() const {
|
||||
return _thumbnail.location.valid()
|
||||
&& !thumbnailFailed()
|
||||
|
Reference in New Issue
Block a user