Fix loading of voice chats participants.

This commit is contained in:
John Preston 2021-01-29 22:07:32 +04:00
parent 1eacaec66b
commit db89de96a9
2 changed files with 10 additions and 11 deletions

View File

@ -1483,7 +1483,9 @@ void MembersController::addMuteActionsToContextMenu(
const auto muteAction = [&]() -> QAction* {
if (muteState == Row::State::Invited
|| user->isSelf()
|| (userIsCallAdmin && row->state() != Row::State::Active)) {
|| (muteState == Row::State::Muted
&& userIsCallAdmin
&& _peer->canManageGroupCall())) {
return nullptr;
}
auto callback = [=] {
@ -1653,6 +1655,13 @@ void GroupMembers::setupList() {
resizeToList();
}, _list->lifetime());
rpl::combine(
_scroll->scrollTopValue(),
_scroll->heightValue()
) | rpl::start_with_next([=](int scrollTop, int scrollHeight) {
_list->setVisibleTopBottom(scrollTop, scrollTop + scrollHeight);
}, _scroll->lifetime());
updateControlsGeometry();
}
@ -1754,12 +1763,6 @@ void GroupMembers::setupFakeRoundCorners() {
}, lifetime());
}
void GroupMembers::visibleTopBottomUpdated(
int visibleTop,
int visibleBottom) {
setChildVisibleTopBottom(_list, visibleTop, visibleBottom);
}
void GroupMembers::peerListSetTitle(rpl::producer<QString> title) {
}

View File

@ -51,10 +51,6 @@ public:
private:
using ListWidget = PeerListContent;
void visibleTopBottomUpdated(
int visibleTop,
int visibleBottom) override;
void resizeEvent(QResizeEvent *e) override;
// PeerListContentDelegate interface.