mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Support animated emoji in caption edit fields.
This commit is contained in:
@@ -672,9 +672,19 @@ void SendFilesBox::updateSendWayControlsVisibility() {
|
||||
}
|
||||
|
||||
void SendFilesBox::setupCaption() {
|
||||
_caption->setMaxLength(kMaxMessageLength);
|
||||
InitMessageFieldHandlers(
|
||||
_controller,
|
||||
_caption.data(),
|
||||
Window::GifPauseReason::Layer);
|
||||
Ui::Emoji::SuggestionsController::Init(
|
||||
getDelegate()->outerContainer(),
|
||||
_caption,
|
||||
&_controller->session());
|
||||
|
||||
_caption->setSubmitSettings(
|
||||
Core::App().settings().sendSubmitWay());
|
||||
_caption->setMaxLength(kMaxMessageLength);
|
||||
|
||||
connect(_caption, &Ui::InputField::resized, [=] {
|
||||
captionResized();
|
||||
});
|
||||
@@ -696,21 +706,6 @@ void SendFilesBox::setupCaption() {
|
||||
}
|
||||
Unexpected("action in MimeData hook.");
|
||||
});
|
||||
const auto show = std::make_shared<Window::Show>(_controller);
|
||||
const auto session = &_controller->session();
|
||||
|
||||
_caption->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||
_caption->setInstantReplacesEnabled(
|
||||
Core::App().settings().replaceEmojiValue());
|
||||
_caption->setMarkdownReplacesEnabled(rpl::single(true));
|
||||
_caption->setEditLinkCallback(
|
||||
DefaultEditLinkCallback(show, session, _caption));
|
||||
Ui::Emoji::SuggestionsController::Init(
|
||||
getDelegate()->outerContainer(),
|
||||
_caption,
|
||||
session);
|
||||
|
||||
InitSpellchecker(show, session, _caption);
|
||||
|
||||
updateCaptionPlaceholder();
|
||||
setupEmojiPanel();
|
||||
|
Reference in New Issue
Block a user