mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix custom emoji in initial send files caption.
This commit is contained in:
@@ -260,12 +260,8 @@ SendFilesBox::SendFilesBox(
|
||||
, _sendLimit(peer->slowmodeApplied() ? SendLimit::One : SendLimit::Many)
|
||||
, _sendMenuType(sendMenuType)
|
||||
, _allowEmojiWithoutPremium(Data::AllowEmojiWithoutPremium(peer))
|
||||
, _caption(
|
||||
this,
|
||||
st::confirmCaptionArea,
|
||||
Ui::InputField::Mode::MultiLine,
|
||||
nullptr,
|
||||
caption)
|
||||
, _caption(this, st::confirmCaptionArea, Ui::InputField::Mode::MultiLine)
|
||||
, _prefilledCaptionText(std::move(caption))
|
||||
, _scroll(this, st::boxScroll)
|
||||
, _inner(
|
||||
_scroll->setOwnedWidget(
|
||||
@@ -688,6 +684,15 @@ void SendFilesBox::setupCaption() {
|
||||
&_controller->session(),
|
||||
{ .suggestCustomEmoji = true, .allowCustomWithoutPremium = allow });
|
||||
|
||||
if (!_prefilledCaptionText.text.isEmpty()) {
|
||||
_caption->setTextWithTags(
|
||||
_prefilledCaptionText,
|
||||
Ui::InputField::HistoryAction::Clear);
|
||||
|
||||
auto cursor = _caption->textCursor();
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
_caption->setTextCursor(cursor);
|
||||
}
|
||||
_caption->setSubmitSettings(
|
||||
Core::App().settings().sendSubmitWay());
|
||||
_caption->setMaxLength(kMaxMessageLength);
|
||||
|
Reference in New Issue
Block a user