mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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] {
|
const auto customEmojiPaused = [controller = args.controller] {
|
||||||
return controller->isGifPausedAtLeastFor(PauseReason::Layer);
|
return controller->isGifPausedAtLeastFor(PauseReason::Layer);
|
||||||
};
|
};
|
||||||
auto context = Core::TextContext({
|
auto simpleContext = Core::TextContext({
|
||||||
.session = session,
|
.session = session,
|
||||||
|
.repaint = [=] { raw->update(); },
|
||||||
});
|
});
|
||||||
|
auto context = simpleContext;
|
||||||
context.customEmojiFactory = [=](
|
context.customEmojiFactory = [=](
|
||||||
QStringView data,
|
QStringView data,
|
||||||
const Ui::Text::MarkedContext &context
|
const Ui::Text::MarkedContext &context
|
||||||
) -> std::unique_ptr<Ui::Text::CustomEmoji> {
|
) -> std::unique_ptr<Ui::Text::CustomEmoji> {
|
||||||
const auto id = Data::ParseCustomEmojiData(data);
|
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()) {
|
if (state->unifiedFactoryOwner->lookupReactionId(id).custom()) {
|
||||||
return std::make_unique<MaybeDisabledEmoji>(
|
return std::make_unique<MaybeDisabledEmoji>(
|
||||||
std::move(result),
|
std::move(result),
|
||||||
|
|
Loading…
Add table
Reference in a new issue