2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Megagroup members are always shown if the server allows us to view them.

Bot keyboard clearing fixed when using Clear History.
This commit is contained in:
John Preston
2016-07-19 14:37:01 +03:00
parent 207981b8c4
commit 1753db3e62
6 changed files with 18 additions and 14 deletions

View File

@@ -72,7 +72,11 @@ void TopBarWidget::onInfoClicked() {
}
void TopBarWidget::onSearch() {
Shortcuts::launch(qsl("search"));
if (auto main = App::main()) {
if (auto peer = main->peer()) {
main->searchInPeer(peer);
}
}
}
void TopBarWidget::enterEvent(QEvent *e) {
@@ -246,11 +250,11 @@ void TopBarWidget::updateMembersShowArea() {
if (_selCount || App::main()->overviewPeer() || !_selPeer) {
return false;
}
if (_selPeer->isChat()) {
return true;
if (auto chat = _selPeer->asChat()) {
return chat->amIn();
}
if (_selPeer->isMegagroup()) {
return (_selPeer->asMegagroup()->membersCount() < Global::ChatSizeMax());
if (auto megagroup = _selPeer->asMegagroup()) {
return megagroup->canViewMembers() && (megagroup->membersCount() < Global::ChatSizeMax());
}
return false;
};