2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Support animated emoji in share box comment.

This commit is contained in:
John Preston
2022-07-01 17:36:58 +04:00
parent 806c5ddf29
commit 7a10d3d82c
6 changed files with 48 additions and 42 deletions

View File

@@ -19,6 +19,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/emoji_config.h"
#include "ui/empty_userpic.h"
#include "ui/ui_utility.h"
#include "data/data_session.h"
#include "data/stickers/data_custom_emoji.h"
#include "dialogs/ui/dialogs_layout.h"
#include "window/window_controller.h"
#include "storage/file_download.h"
@@ -974,6 +976,14 @@ void Notification::showReplyField() {
_replyArea->setInstantReplacesEnabled(
Core::App().settings().replaceEmojiValue());
_replyArea->setMarkdownReplacesEnabled(rpl::single(true));
const auto session = &_item->history()->session();
_replyArea->setCustomEmojiFactory([=](
QStringView data,
Fn<void()> update) {
return session->data().customEmojiManager().create(
data,
std::move(update));
});
// Catch mouse press event to activate the window.
QCoreApplication::instance()->installEventFilter(this);