Fix group call members list height.

This commit is contained in:
John Preston 2020-11-27 19:55:18 +03:00
parent b8f23bda59
commit eb40edae22
2 changed files with 13 additions and 1 deletions

View file

@ -478,7 +478,18 @@ int GroupMembers::desiredHeight() const {
}();
desired += std::max(count, _list->fullRowsCount())
* st::groupCallMembersList.item.height;
return std::max(height(), desired);
return desired;
}
rpl::producer<int> GroupMembers::desiredHeightValue() const {
const auto controller = static_cast<MembersController*>(
_listController.get());
return rpl::combine(
heightValue(),
controller->fullCountValue()
) | rpl::map([=] {
return desiredHeight();
});
}
void GroupMembers::setupHeader(not_null<GroupCall*> call) {

View file

@ -35,6 +35,7 @@ public:
};
[[nodiscard]] int desiredHeight() const;
[[nodiscard]] rpl::producer<int> desiredHeightValue() const override;
[[nodiscard]] rpl::producer<MuteRequest> toggleMuteRequests() const;
private: