diff --git a/Telegram/SourceFiles/boxes/add_contact_box.cpp b/Telegram/SourceFiles/boxes/add_contact_box.cpp index 1061cac913..6618191329 100644 --- a/Telegram/SourceFiles/boxes/add_contact_box.cpp +++ b/Telegram/SourceFiles/boxes/add_contact_box.cpp @@ -32,7 +32,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { -constexpr auto kMaxGroupChannelTitle = 255; +constexpr auto kMaxGroupChannelTitle = 255; // See also edit_peer_info_box. constexpr auto kMaxChannelDescription = 255; // See also edit_peer_info_box. constexpr auto kMaxBioLength = 70; constexpr auto kMinUsernameLength = 5; @@ -320,6 +320,8 @@ void GroupInfoBox::prepare() { ? lng_dlg_new_channel_name : lng_dlg_new_group_name)); _title->setMaxLength(kMaxGroupChannelTitle); + _title->setInstantReplaces(Ui::InstantReplaces::Default()); + _title ->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); if (_creating == CreatingGroupChannel) { _description.create( @@ -1164,6 +1166,8 @@ void EditChannelBox::prepare() { setMouseTracking(true); _title->setMaxLength(kMaxGroupChannelTitle); + _title->setInstantReplaces(Ui::InstantReplaces::Default()); + _title->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); _description->setMaxLength(kMaxChannelDescription); _description->setInstantReplaces(Ui::InstantReplaces::Default()); _description->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index ac95ffb518..f99bf4f80d 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -38,6 +38,7 @@ namespace { constexpr auto kUsernameCheckTimeout = TimeMs(200); constexpr auto kMinUsernameLength = 5; +constexpr auto kMaxGroupChannelTitle = 255; // See also add_contact_box. constexpr auto kMaxChannelDescription = 255; // See also add_contact_box. class Controller @@ -299,6 +300,10 @@ object_ptr Controller::createTitleEdit() { : lng_dlg_new_channel_name), _peer->name), st::editPeerTitleMargins); + result->entity()->setMaxLength(kMaxGroupChannelTitle); + result->entity()->setInstantReplaces(Ui::InstantReplaces::Default()); + result->entity()->setInstantReplacesEnabled( + Global::ReplaceEmojiValue()); QObject::connect( result->entity(),