Hide history visibility edit for public groups.

This commit is contained in:
John Preston 2017-12-18 10:18:51 +04:00
parent b8204a317d
commit cbbccd0364
1 changed files with 2 additions and 1 deletions

View File

@ -814,7 +814,8 @@ object_ptr<Ui::RpWidget> Controller::createHistoryVisibilityEdit() {
auto channel = _peer->asChannel();
if (!channel
|| !channel->canEditPreHistoryHidden()
|| !channel->isMegagroup()) {
|| !channel->isMegagroup()
|| (channel->isPublic() && !channel->canEditUsername())) {
return nullptr;
}
auto result = object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(