2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +00:00

Improve new settings design.

This commit is contained in:
John Preston
2018-09-13 23:09:26 +03:00
parent ffc4cd3415
commit c2039da600
31 changed files with 463 additions and 304 deletions

View File

@@ -294,6 +294,8 @@ void Cover::initViewers() {
) | rpl::start_with_next(
[this] { refreshUploadPhotoOverlay(); },
lifetime());
} else if (_peer->isSelf()) {
refreshUploadPhotoOverlay();
}
VerifiedValue(
_peer
@@ -304,12 +306,12 @@ void Cover::initViewers() {
void Cover::refreshUploadPhotoOverlay() {
_userpic->switchChangePhotoOverlay([&] {
if (auto chat = _peer->asChat()) {
if (const auto chat = _peer->asChat()) {
return chat->canEdit();
} else if (auto channel = _peer->asChannel()) {
} else if (const auto channel = _peer->asChannel()) {
return channel->canEditInformation();
}
return false;
return _peer->isSelf();
}());
}