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

Support animated emoji in share box comment.

This commit is contained in:
John Preston
2022-07-01 17:36:58 +04:00
parent 806c5ddf29
commit 7a10d3d82c
6 changed files with 48 additions and 42 deletions

View File

@@ -220,28 +220,16 @@ void ShareBox::prepareCommentField() {
connect(field, &Ui::InputField::submitted, [=] {
submit({});
});
field->setInstantReplaces(Ui::InstantReplaces::Default());
field->setInstantReplacesEnabled(
Core::App().settings().replaceEmojiValue());
field->setMarkdownReplacesEnabled(rpl::single(true));
if (_descriptor.initEditLink) {
_descriptor.initEditLink(field);
} else if (_show->valid()) {
field->setEditLinkCallback(
DefaultEditLinkCallback(
_show,
_descriptor.session,
field,
_descriptor.stLabel));
if (_show->valid()) {
InitMessageFieldHandlers(
_descriptor.session,
_show,
field,
nullptr,
_descriptor.stLabel);
}
field->setSubmitSettings(Core::App().settings().sendSubmitWay());
if (_descriptor.initSpellchecker) {
_descriptor.initSpellchecker(field);
} else if (_show->valid()) {
InitSpellchecker(_show, _descriptor.session, field, true);
}
Ui::SendPendingMoveResizeEvents(_comment);
if (_bottomWidget) {
Ui::SendPendingMoveResizeEvents(_bottomWidget);