2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +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

@@ -221,8 +221,8 @@ void Panel::migrate(not_null<ChannelData*> channel) {
void Panel::subscribeToPeerChanges() {
Info::Profile::NameValue(
_peer
) | rpl::start_with_next([=](const TextWithEntities &name) {
window()->setTitle(name.text);
) | rpl::start_with_next([=](const QString &name) {
window()->setTitle(name);
}, _peerLifetime);
}
@@ -2336,10 +2336,8 @@ void Panel::refreshTitle() {
) | rpl::map([=](not_null<Data::GroupCall*> real) {
return real->titleValue();
}) | rpl::flatten_latest())
) | rpl::map([=](
const TextWithEntities &name,
const QString &title) {
return title.isEmpty() ? name.text : title;
) | rpl::map([=](const QString &name, const QString &title) {
return title.isEmpty() ? name : title;
}) | rpl::after_next([=] {
refreshTitleGeometry();
});