Ignore 'Replace emoji' setting in markdown.

Partially fixes #4727. Fixes #4731.
This commit is contained in:
John Preston 2018-05-25 20:47:29 +03:00
parent 7a32ad5409
commit 10fa6f0c13
4 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ EditCaptionBox::EditCaptionBox(
_field->setSubmitSettings(Ui::InputField::SubmitSettings::Both); _field->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
_field->setInstantReplaces(Ui::InstantReplaces::Default()); _field->setInstantReplaces(Ui::InstantReplaces::Default());
_field->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); _field->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
_field->setMarkdownReplacesEnabled(Global::ReplaceEmojiValue()); _field->setMarkdownReplacesEnabled(rpl::single(true));
} }
void EditCaptionBox::prepareGifPreview(DocumentData *document) { void EditCaptionBox::prepareGifPreview(DocumentData *document) {

View File

@ -1578,7 +1578,7 @@ void SendFilesBox::setupCaption() {
}); });
_caption->setInstantReplaces(Ui::InstantReplaces::Default()); _caption->setInstantReplaces(Ui::InstantReplaces::Default());
_caption->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); _caption->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
_caption->setMarkdownReplacesEnabled(Global::ReplaceEmojiValue()); _caption->setMarkdownReplacesEnabled(rpl::single(true));
} }
void SendFilesBox::captionResized() { void SendFilesBox::captionResized() {

View File

@ -147,7 +147,7 @@ void InitMessageField(not_null<Ui::InputField*> field) {
field->customTab(true); field->customTab(true);
field->setInstantReplaces(Ui::InstantReplaces::Default()); field->setInstantReplaces(Ui::InstantReplaces::Default());
field->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); field->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
field->setMarkdownReplacesEnabled(Global::ReplaceEmojiValue()); field->setMarkdownReplacesEnabled(rpl::single(true));
} }
bool HasSendText(not_null<const Ui::InputField*> field) { bool HasSendText(not_null<const Ui::InputField*> field) {

View File

@ -773,7 +773,7 @@ void Notification::showReplyField() {
_replyArea->setSubmitSettings(Ui::InputField::SubmitSettings::Both); _replyArea->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
_replyArea->setInstantReplaces(Ui::InstantReplaces::Default()); _replyArea->setInstantReplaces(Ui::InstantReplaces::Default());
_replyArea->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); _replyArea->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
_replyArea->setMarkdownReplacesEnabled(Global::ReplaceEmojiValue()); _replyArea->setMarkdownReplacesEnabled(rpl::single(true));
// Catch mouse press event to activate the window. // Catch mouse press event to activate the window.
QCoreApplication::instance()->installEventFilter(this); QCoreApplication::instance()->installEventFilter(this);