From 9d591ae80619b72bcececcd25b91463749902bb7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 10 Mar 2025 10:59:39 +0400 Subject: [PATCH] Fix infinite recursion in channel reactions edit. --- Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp index 5313a2ae3..fdc31618f 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp @@ -363,15 +363,17 @@ object_ptr AddReactionsSelector( const auto customEmojiPaused = [controller = args.controller] { return controller->isGifPausedAtLeastFor(PauseReason::Layer); }; - auto context = Core::TextContext({ + auto simpleContext = Core::TextContext({ .session = session, + .repaint = [=] { raw->update(); }, }); + auto context = simpleContext; context.customEmojiFactory = [=]( QStringView data, const Ui::Text::MarkedContext &context ) -> std::unique_ptr { const auto id = Data::ParseCustomEmojiData(data); - auto result = Ui::Text::MakeCustomEmoji(data, context); + auto result = Ui::Text::MakeCustomEmoji(data, simpleContext); if (state->unifiedFactoryOwner->lookupReactionId(id).custom()) { return std::make_unique( std::move(result),