Skip to content

Commit

Permalink
Update floating player position.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed May 24, 2017
1 parent 18195f9 commit 03aeaad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Telegram/SourceFiles/dialogswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions Telegram/SourceFiles/historywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/mainwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ void MainWidget::checkFloatPlayerVisibility() {
instance->hiddenByHistory = true;
}
toggleFloatPlayer(instance);
updateFloatPlayerPosition(instance);
}

void MainWidget::updateFloatPlayerPosition(Float *instance) {
Expand Down

0 comments on commit 03aeaad

Please sign in to comment.