2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

convert to supergroup in all groups

This commit is contained in:
John Preston
2016-03-05 00:04:15 +02:00
parent cb78bd1a10
commit 2bfb1e0f1f
8 changed files with 215 additions and 20 deletions

View File

@@ -1213,7 +1213,11 @@ void EditChannelBox::showAll() {
_description.show();
_save.show();
_cancel.show();
_publicLink.show();
if (_channel->amCreator()) {
_publicLink.show();
} else {
_publicLink.hide();
}
if (_channel->isMegagroup()) {
_sign.hide();
} else {
@@ -1260,7 +1264,9 @@ void EditChannelBox::updateMaxHeight() {
if (!_channel->isMegagroup()) {
h += st::newGroupPublicLinkPadding.top() + _sign.height() + st::newGroupPublicLinkPadding.bottom();
}
h += st::newGroupPublicLinkPadding.top() + _publicLink.height() + st::newGroupPublicLinkPadding.bottom();
if (_channel->amCreator()) {
h += st::newGroupPublicLinkPadding.top() + _publicLink.height() + st::newGroupPublicLinkPadding.bottom();
}
h += st::boxPadding.bottom() + st::newGroupInfoPadding.bottom() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom();
setMaxHeight(h);
}