Simplify marked text context logic.

This commit is contained in:
John Preston
2025-03-07 14:17:39 +04:00
parent 789f3e1584
commit c9fb97cd7c
98 changed files with 441 additions and 609 deletions
@@ -172,12 +172,6 @@ private:
[[nodiscard]] Ui::CollectibleDetails PrepareCollectibleDetails(
not_null<Main::Session*> session) {
const auto makeContext = [=] {
return Core::MarkedTextContext{
.session = session,
.customEmojiRepaint = [] {},
};
};
return {
.tonEmoji = Ui::Text::SingleCustomEmoji(
session->data().customEmojiManager().registerInternalEmoji(
@@ -186,7 +180,7 @@ private:
st::collectibleInfo.textFg->c),
st::collectibleInfoTonMargins,
true)),
.tonEmojiContext = makeContext,
.tonEmojiContext = Core::TextContext({ .session = session }),
};
}