2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Allow editing topic title and icon.

This commit is contained in:
John Preston
2022-09-27 16:05:47 +04:00
parent c90f879c96
commit 3b3792ef75
42 changed files with 603 additions and 190 deletions

View File

@@ -313,7 +313,7 @@ void SetupPhoto(
) | rpl::start_with_next([=](
int max,
int photoWidth,
const TextWithEntities&,
const QString&,
int statusWidth) {
photo->moveToLeft(
(max - photoWidth) / 2,
@@ -398,7 +398,7 @@ void SetupRows(
AddRow(
container,
tr::lng_settings_name_label(),
Info::Profile::NameValue(self),
Info::Profile::NameValue(self) | Ui::Text::ToWithEntities(),
tr::lng_profile_copy_fullname(tr::now),
[=] { controller->show(Box<EditNameBox>(self)); },
{ &st::settingsIconUser, kIconLightBlue });

View File

@@ -176,8 +176,8 @@ void Cover::setupChildGeometry() {
void Cover::initViewers() {
Info::Profile::NameValue(
_user
) | rpl::start_with_next([=](const TextWithEntities &value) {
_name->setText(value.text);
) | rpl::start_with_next([=](const QString &name) {
_name->setText(name);
refreshNameGeometry(width());
}, lifetime());

View File

@@ -671,7 +671,7 @@ TopBarUser::TopBarUser(
Info::Profile::NameValue(peer)
) | rpl::start_with_next([=](
DocumentData *document,
TextWithEntities name) {
const QString &name) {
if (document) {
_emojiStatus = std::make_unique<EmojiStatusTopBar>(
document,
@@ -713,7 +713,7 @@ TopBarUser::TopBarUser(
_emojiStatus = nullptr;
}
updateTitle(document, name, controller);
updateTitle(document, { name }, controller);
updateAbout(document);
auto event = QResizeEvent(size(), size());