mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
parent
4108debca0
commit
699a7bdc58
1 changed files with 7 additions and 4 deletions
|
@ -392,6 +392,9 @@ void InitMessageFieldHandlers(
|
|||
Fn<bool()> customEmojiPaused,
|
||||
Fn<bool(not_null<DocumentData*>)> allowPremiumEmoji,
|
||||
const style::InputField *fieldStyle) {
|
||||
const auto paused = [customEmojiPaused] {
|
||||
return customEmojiPaused && customEmojiPaused();
|
||||
};
|
||||
field->setTagMimeProcessor(
|
||||
FieldTagMimeProcessor(session, allowPremiumEmoji));
|
||||
field->setCustomTextContext([=](Fn<void()> repaint) {
|
||||
|
@ -399,10 +402,10 @@ void InitMessageFieldHandlers(
|
|||
.session = session,
|
||||
.customEmojiRepaint = std::move(repaint),
|
||||
});
|
||||
}, [customEmojiPaused] {
|
||||
return On(PowerSaving::kEmojiChat) || customEmojiPaused();
|
||||
}, [customEmojiPaused] {
|
||||
return On(PowerSaving::kChatSpoiler) || customEmojiPaused();
|
||||
}, [paused] {
|
||||
return On(PowerSaving::kEmojiChat) || paused();
|
||||
}, [paused] {
|
||||
return On(PowerSaving::kChatSpoiler) || paused();
|
||||
});
|
||||
field->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||
field->setInstantReplacesEnabled(
|
||||
|
|
Loading…
Add table
Reference in a new issue