mirror of https://github.com/procxx/kepka.git
Respect user settings "Send by ..." for:
forward dialog send file dialog edit caption dialog notification replay schedule messages new channel dialog group description edit dialog create poll dialog rate call dialog report bot dialog support mode
This commit is contained in:
parent
38bef584e1
commit
9c562931a2
|
@ -494,6 +494,7 @@ void GroupInfoBox::prepare() {
|
||||||
_description->setInstantReplaces(Ui::InstantReplaces::Default());
|
_description->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||||
_description->setInstantReplacesEnabled(
|
_description->setInstantReplacesEnabled(
|
||||||
_navigation->session().settings().replaceEmojiValue());
|
_navigation->session().settings().replaceEmojiValue());
|
||||||
|
_description->setSubmitSettings(_navigation->session().settings().sendSubmitWay());
|
||||||
|
|
||||||
connect(_description, &Ui::InputField::resized, [=] { descriptionResized(); });
|
connect(_description, &Ui::InputField::resized, [=] { descriptionResized(); });
|
||||||
connect(_description, &Ui::InputField::submitted, [=] { submit(); });
|
connect(_description, &Ui::InputField::submitted, [=] { submit(); });
|
||||||
|
|
|
@ -767,6 +767,7 @@ not_null<Ui::InputField*> CreatePollBox::setupQuestion(
|
||||||
st::createPollFieldPadding);
|
st::createPollFieldPadding);
|
||||||
InitField(getDelegate()->outerContainer(), question, _session);
|
InitField(getDelegate()->outerContainer(), question, _session);
|
||||||
question->setMaxLength(kQuestionLimit + kErrorLimit);
|
question->setMaxLength(kQuestionLimit + kErrorLimit);
|
||||||
|
question->setSubmitSettings(_session->settings().sendSubmitWay());
|
||||||
|
|
||||||
const auto warning = CreateWarningLabel(
|
const auto warning = CreateWarningLabel(
|
||||||
container,
|
container,
|
||||||
|
|
|
@ -260,7 +260,7 @@ EditCaptionBox::EditCaptionBox(
|
||||||
tr::lng_photo_caption(),
|
tr::lng_photo_caption(),
|
||||||
editData);
|
editData);
|
||||||
_field->setMaxLength(Global::CaptionLengthMax());
|
_field->setMaxLength(Global::CaptionLengthMax());
|
||||||
_field->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
|
_field->setSubmitSettings(_controller->session().settings().sendSubmitWay());
|
||||||
_field->setInstantReplaces(Ui::InstantReplaces::Default());
|
_field->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||||
_field->setInstantReplacesEnabled(
|
_field->setInstantReplacesEnabled(
|
||||||
_controller->session().settings().replaceEmojiValue());
|
_controller->session().settings().replaceEmojiValue());
|
||||||
|
|
|
@ -500,6 +500,7 @@ object_ptr<Ui::RpWidget> Controller::createDescriptionEdit() {
|
||||||
result->entity()->setInstantReplaces(Ui::InstantReplaces::Default());
|
result->entity()->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||||
result->entity()->setInstantReplacesEnabled(
|
result->entity()->setInstantReplacesEnabled(
|
||||||
_peer->session().settings().replaceEmojiValue());
|
_peer->session().settings().replaceEmojiValue());
|
||||||
|
result->entity()->setSubmitSettings(_peer->session().settings().sendSubmitWay());
|
||||||
Ui::Emoji::SuggestionsController::Init(
|
Ui::Emoji::SuggestionsController::Init(
|
||||||
_wrap->window(),
|
_wrap->window(),
|
||||||
result->entity(),
|
result->entity(),
|
||||||
|
|
|
@ -85,7 +85,7 @@ void RateCallBox::ratingChanged(int value) {
|
||||||
Ui::InputField::Mode::MultiLine,
|
Ui::InputField::Mode::MultiLine,
|
||||||
tr::lng_call_rate_comment());
|
tr::lng_call_rate_comment());
|
||||||
_comment->show();
|
_comment->show();
|
||||||
_comment->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
|
_comment->setSubmitSettings(_session->settings().sendSubmitWay());
|
||||||
_comment->setMaxLength(kRateCallCommentLengthMax);
|
_comment->setMaxLength(kRateCallCommentLengthMax);
|
||||||
_comment->resize(width() - (st::callRatingPadding.left() + st::callRatingPadding.right()), _comment->height());
|
_comment->resize(width() - (st::callRatingPadding.left() + st::callRatingPadding.right()), _comment->height());
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "data/data_peer.h"
|
#include "data/data_peer.h"
|
||||||
|
#include "main/main_session.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "ui/widgets/checkbox.h"
|
#include "ui/widgets/checkbox.h"
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
|
@ -106,7 +107,7 @@ void ReportBox::reasonChanged(Reason reason) {
|
||||||
Ui::InputField::Mode::MultiLine,
|
Ui::InputField::Mode::MultiLine,
|
||||||
tr::lng_report_reason_description());
|
tr::lng_report_reason_description());
|
||||||
_reasonOtherText->show();
|
_reasonOtherText->show();
|
||||||
_reasonOtherText->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
|
_reasonOtherText->setSubmitSettings(_peer->session().settings().sendSubmitWay());
|
||||||
_reasonOtherText->setMaxLength(kReportReasonLengthMax);
|
_reasonOtherText->setMaxLength(kReportReasonLengthMax);
|
||||||
_reasonOtherText->resize(width() - (st::boxPadding.left() + st::boxOptionListPadding.left() + st::boxPadding.right()), _reasonOtherText->height());
|
_reasonOtherText->resize(width() - (st::boxPadding.left() + st::boxOptionListPadding.left() + st::boxPadding.right()), _reasonOtherText->height());
|
||||||
|
|
||||||
|
|
|
@ -2046,7 +2046,7 @@ void SendFilesBox::applyAlbumOrder() {
|
||||||
|
|
||||||
void SendFilesBox::setupCaption() {
|
void SendFilesBox::setupCaption() {
|
||||||
_caption->setMaxLength(Global::CaptionLengthMax());
|
_caption->setMaxLength(Global::CaptionLengthMax());
|
||||||
_caption->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
|
_caption->setSubmitSettings(_controller->session().settings().sendSubmitWay());
|
||||||
connect(_caption, &Ui::InputField::resized, [=] {
|
connect(_caption, &Ui::InputField::resized, [=] {
|
||||||
captionResized();
|
captionResized();
|
||||||
});
|
});
|
||||||
|
|
|
@ -206,6 +206,7 @@ void ShareBox::prepareCommentField() {
|
||||||
field->setMarkdownReplacesEnabled(rpl::single(true));
|
field->setMarkdownReplacesEnabled(rpl::single(true));
|
||||||
field->setEditLinkCallback(
|
field->setEditLinkCallback(
|
||||||
DefaultEditLinkCallback(&_navigation->session(), field));
|
DefaultEditLinkCallback(&_navigation->session(), field));
|
||||||
|
field->setSubmitSettings(_navigation->session().settings().sendSubmitWay());
|
||||||
|
|
||||||
InitSpellchecker(&_navigation->session(), field);
|
InitSpellchecker(&_navigation->session(), field);
|
||||||
Ui::SendPendingMoveResizeEvents(_comment);
|
Ui::SendPendingMoveResizeEvents(_comment);
|
||||||
|
|
|
@ -201,6 +201,7 @@ void ComposeControls::init() {
|
||||||
|
|
||||||
void ComposeControls::initField() {
|
void ComposeControls::initField() {
|
||||||
_field->setMaxHeight(st::historyComposeFieldMaxHeight);
|
_field->setMaxHeight(st::historyComposeFieldMaxHeight);
|
||||||
|
_field->setSubmitSettings(_window->session().settings().sendSubmitWay());
|
||||||
//Ui::Connect(_field, &Ui::InputField::submitted, [=] { send(); });
|
//Ui::Connect(_field, &Ui::InputField::submitted, [=] { send(); });
|
||||||
Ui::Connect(_field, &Ui::InputField::cancelled, [=] { escape(); });
|
Ui::Connect(_field, &Ui::InputField::cancelled, [=] { escape(); });
|
||||||
//Ui::Connect(_field, &Ui::InputField::tabbed, [=] { fieldTabbed(); });
|
//Ui::Connect(_field, &Ui::InputField::tabbed, [=] { fieldTabbed(); });
|
||||||
|
|
|
@ -77,7 +77,7 @@ EditInfoBox::EditInfoBox(
|
||||||
text)
|
text)
|
||||||
, _submit(std::move(submit)) {
|
, _submit(std::move(submit)) {
|
||||||
_field->setMaxLength(kMaxSupportInfoLength);
|
_field->setMaxLength(kMaxSupportInfoLength);
|
||||||
_field->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
|
_field->setSubmitSettings(session->settings().sendSubmitWay());
|
||||||
_field->setInstantReplaces(Ui::InstantReplaces::Default());
|
_field->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||||
_field->setInstantReplacesEnabled(
|
_field->setInstantReplacesEnabled(
|
||||||
session->settings().replaceEmojiValue());
|
session->settings().replaceEmojiValue());
|
||||||
|
|
|
@ -858,7 +858,7 @@ void Notification::showReplyField() {
|
||||||
_replyArea->show();
|
_replyArea->show();
|
||||||
_replyArea->setFocus();
|
_replyArea->setFocus();
|
||||||
_replyArea->setMaxLength(MaxMessageSize);
|
_replyArea->setMaxLength(MaxMessageSize);
|
||||||
_replyArea->setSubmitSettings(Ui::InputField::SubmitSettings::Both);
|
_replyArea->setSubmitSettings(_item->history()->session().settings().sendSubmitWay());
|
||||||
_replyArea->setInstantReplaces(Ui::InstantReplaces::Default());
|
_replyArea->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||||
_replyArea->setInstantReplacesEnabled(
|
_replyArea->setInstantReplacesEnabled(
|
||||||
_item->history()->session().settings().replaceEmojiValue());
|
_item->history()->session().settings().replaceEmojiValue());
|
||||||
|
|
Loading…
Reference in New Issue