mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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()> customEmojiPaused,
|
||||||
Fn<bool(not_null<DocumentData*>)> allowPremiumEmoji,
|
Fn<bool(not_null<DocumentData*>)> allowPremiumEmoji,
|
||||||
const style::InputField *fieldStyle) {
|
const style::InputField *fieldStyle) {
|
||||||
|
const auto paused = [customEmojiPaused] {
|
||||||
|
return customEmojiPaused && customEmojiPaused();
|
||||||
|
};
|
||||||
field->setTagMimeProcessor(
|
field->setTagMimeProcessor(
|
||||||
FieldTagMimeProcessor(session, allowPremiumEmoji));
|
FieldTagMimeProcessor(session, allowPremiumEmoji));
|
||||||
field->setCustomTextContext([=](Fn<void()> repaint) {
|
field->setCustomTextContext([=](Fn<void()> repaint) {
|
||||||
|
@ -399,10 +402,10 @@ void InitMessageFieldHandlers(
|
||||||
.session = session,
|
.session = session,
|
||||||
.customEmojiRepaint = std::move(repaint),
|
.customEmojiRepaint = std::move(repaint),
|
||||||
});
|
});
|
||||||
}, [customEmojiPaused] {
|
}, [paused] {
|
||||||
return On(PowerSaving::kEmojiChat) || customEmojiPaused();
|
return On(PowerSaving::kEmojiChat) || paused();
|
||||||
}, [customEmojiPaused] {
|
}, [paused] {
|
||||||
return On(PowerSaving::kChatSpoiler) || customEmojiPaused();
|
return On(PowerSaving::kChatSpoiler) || paused();
|
||||||
});
|
});
|
||||||
field->setInstantReplaces(Ui::InstantReplaces::Default());
|
field->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||||
field->setInstantReplacesEnabled(
|
field->setInstantReplacesEnabled(
|
||||||
|
|
Loading…
Add table
Reference in a new issue