Fix top bar controls in chat view.

This commit is contained in:
John Preston 2020-12-11 14:20:17 +04:00
parent 4b31b4792a
commit 49b8340695

View file

@ -664,9 +664,11 @@ void TopBarWidget::updateControlsGeometry() {
if (!_infoToggle->isHidden()) { if (!_infoToggle->isHidden()) {
_rightTaken += _infoToggle->width() + st::topBarSkip; _rightTaken += _infoToggle->width() + st::topBarSkip;
} }
_call->moveToRight(_rightTaken, otherButtonsTop); if (!_call->isHidden() || !_groupCall->isHidden()) {
_groupCall->moveToRight(_rightTaken, otherButtonsTop); _call->moveToRight(_rightTaken, otherButtonsTop);
_rightTaken += _call->width(); _groupCall->moveToRight(_rightTaken, otherButtonsTop);
_rightTaken += _call->width();
}
_search->moveToRight(_rightTaken, otherButtonsTop); _search->moveToRight(_rightTaken, otherButtonsTop);
_rightTaken += _search->width() + st::topBarCallSkip; _rightTaken += _search->width() + st::topBarCallSkip;
@ -726,7 +728,7 @@ void TopBarWidget::updateControlsVisibility() {
const auto callsEnabled = [&] { const auto callsEnabled = [&] {
if (const auto peer = _activeChat.key.peer()) { if (const auto peer = _activeChat.key.peer()) {
if (const auto user = peer->asUser()) { if (const auto user = peer->asUser()) {
return true; return !user->isSelf() && !user->isBot();
} }
} }
return false; return false;