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

@@ -772,6 +772,8 @@ void Notification::showReplyField() {
_replyArea->setMaxLength(MaxMessageSize);
_replyArea->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
_replyArea->setInstantReplaces(Ui::InstantReplaces::Default());
_replyArea->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
_replyArea->setMarkdownReplacesEnabled(Global::ReplaceEmojiValue());
// Catch mouse press event to activate the window.
QCoreApplication::instance()->installEventFilter(this);
@@ -795,7 +797,10 @@ void Notification::sendReply() {
auto peerId = _history->peer->id;
auto msgId = _item ? _item->id : ShowAtUnreadMsgId;
manager()->notificationReplied(peerId, msgId, _replyArea->getLastText());
manager()->notificationReplied(
peerId,
msgId,
_replyArea->getTextWithTags());
manager()->startAllHiding();
}