mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Show custom emoji in private chat reactions.
This commit is contained in:
@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_document.h"
|
||||
#include "data/data_document_media.h"
|
||||
#include "data/stickers/data_custom_emoji.h"
|
||||
#include "lottie/lottie_icon.h"
|
||||
#include "storage/localimageloader.h"
|
||||
#include "ui/image/image_location_factory.h"
|
||||
@@ -203,6 +204,16 @@ QImage Reactions::resolveImageFor(
|
||||
Unexpected("ImageSize in Reactions::resolveImageFor.");
|
||||
}
|
||||
|
||||
std::unique_ptr<Ui::Text::CustomEmoji> Reactions::resolveCustomFor(
|
||||
const ReactionId &emoji,
|
||||
ImageSize size) {
|
||||
const auto custom = std::get_if<DocumentId>(&emoji.data);
|
||||
if (!custom) {
|
||||
return nullptr;
|
||||
}
|
||||
return _owner->customEmojiManager().create(*custom, [] {});
|
||||
}
|
||||
|
||||
void Reactions::resolveImages() {
|
||||
for (auto &[id, set] : _images) {
|
||||
if (!set.bottomInfo.isNull() || set.icon || set.media) {
|
||||
|
Reference in New Issue
Block a user