Limit voice chat title to 40 characters.

This commit is contained in:
John Preston 2021-03-16 18:51:11 +04:00
parent 056cab6268
commit 5621e41529
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Calls::Group {
namespace {
constexpr auto kMaxGroupCallLength = 40;
void EditGroupCallTitleBox(
not_null<Ui::GenericBox*> box,
const QString &placeholder,
@ -42,6 +44,7 @@ void EditGroupCallTitleBox(
st::groupCallField,
rpl::single(placeholder),
title));
input->setMaxLength(kMaxGroupCallLength);
box->setFocusCallback([=] {
input->setFocusFast();
});