2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Support markdown and replaces in media captions.

This commit is contained in:
John Preston
2018-05-24 16:03:21 +03:00
parent 6f6ec217e3
commit 5e7642b42a
22 changed files with 133 additions and 63 deletions

View File

@@ -146,14 +146,8 @@ void InitMessageField(not_null<Ui::InputField*> field) {
field->customTab(true);
field->setInstantReplaces(Ui::InstantReplaces::Default());
field->enableInstantReplaces(Global::ReplaceEmoji());
field->enableMarkdownSupport(Global::ReplaceEmoji());
auto &changed = Global::RefReplaceEmojiChanged();
Ui::AttachAsChild(field, changed.add_subscription([=] {
field->enableInstantReplaces(Global::ReplaceEmoji());
field->enableMarkdownSupport(Global::ReplaceEmoji());
}));
field->window()->activateWindow();
field->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
field->setMarkdownReplacesEnabled(Global::ReplaceEmojiValue());
}
bool HasSendText(not_null<const Ui::InputField*> field) {