mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-11 11:47:09 +02:00
Fix infinite recursion in channel reactions edit.
This commit is contained in:
parent
7d30e3913c
commit
9d591ae806
1 changed files with 4 additions and 2 deletions
|
@ -363,15 +363,17 @@ object_ptr<Ui::RpWidget> 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<Ui::Text::CustomEmoji> {
|
||||
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<MaybeDisabledEmoji>(
|
||||
std::move(result),
|
||||
|
|
Loading…
Add table
Reference in a new issue