Update floating player position.

This commit is contained in:
John Preston 2017-05-24 13:17:29 +03:00
parent 18195f9c4e
commit 03aeaadd5b
3 changed files with 7 additions and 0 deletions

View file

@ -3094,7 +3094,11 @@ void DialogsWidget::updateControlsGeometry() {
_updateTelegram->setGeometry(0, height() - updateHeight, width(), updateHeight);
scrollHeight -= updateHeight;
}
auto wasScrollHeight = _scroll->height();
_scroll->setGeometry(0, scrollTop, width(), scrollHeight);
if (scrollHeight != wasScrollHeight) {
controller()->floatPlayerAreaUpdated().notify(true);
}
if (addToScroll) {
_scroll->scrollToY(newScrollTop);
} else {

View file

@ -4789,6 +4789,8 @@ void HistoryWidget::updateListSize(bool initial, bool loadedDown, const ScrollCh
_fieldAutocomplete->setBoundings(_scroll->geometry());
_historyDown->moveToRight(st::historyToDownPosition.x(), _scroll->y() + _scroll->height() - _historyDown->height() - st::historyToDownPosition.y());
controller()->floatPlayerAreaUpdated().notify(true);
}
_list->recountHeight();

View file

@ -292,6 +292,7 @@ void MainWidget::checkFloatPlayerVisibility() {
instance->hiddenByHistory = true;
}
toggleFloatPlayer(instance);
updateFloatPlayerPosition(instance);
}
void MainWidget::updateFloatPlayerPosition(Float *instance) {