mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
Simplify marked text context logic.
This commit is contained in:
@@ -433,12 +433,9 @@ void InitMessageFieldHandlers(MessageFieldHandlersArgs &&args) {
|
||||
const auto session = args.session;
|
||||
field->setTagMimeProcessor(
|
||||
FieldTagMimeProcessor(session, args.allowPremiumEmoji));
|
||||
field->setCustomTextContext([=](Fn<void()> repaint) {
|
||||
return std::any(Core::MarkedTextContext{
|
||||
.session = session,
|
||||
.customEmojiRepaint = std::move(repaint),
|
||||
});
|
||||
}, [paused] {
|
||||
field->setCustomTextContext(Core::TextContext({
|
||||
.session = session
|
||||
}), [paused] {
|
||||
return On(PowerSaving::kEmojiChat) || paused();
|
||||
}, [paused] {
|
||||
return On(PowerSaving::kChatSpoiler) || paused();
|
||||
|
Reference in New Issue
Block a user