Fix render bug in single column layout.

This commit is contained in:
John Preston 2017-12-02 14:22:48 +04:00
parent 0a1165dac9
commit 675499df4d
4 changed files with 9 additions and 3 deletions

View File

@ -439,11 +439,16 @@ void HistoryTopBarWidget::updateControlsGeometry() {
updateMembersShowArea();
}
void HistoryTopBarWidget::finishAnimating() {
_selectedShown.finish();
updateControlsVisibility();
}
void HistoryTopBarWidget::setAnimationMode(bool enabled) {
if (_animationMode != enabled) {
_animationMode = enabled;
setAttribute(Qt::WA_OpaquePaintEvent, !_animationMode);
_selectedShown.finish();
finishAnimating();
updateControlsVisibility();
}
}

View File

@ -48,6 +48,7 @@ public:
};
void updateControlsVisibility();
void finishAnimating();
void showSelected(SelectedState state);
rpl::producer<bool> membersShowAreaActive() const {
return _membersShowAreaActive.events();

View File

@ -3118,7 +3118,7 @@ void HistoryWidget::showAnimated(
_cacheUnder = params.oldContentCache;
show();
_topBar->updateControlsVisibility();
_topBar->finishAnimating();
historyDownAnimationFinish();
unreadMentionsAnimationFinish();
_topShadow->setVisible(params.withTopBarShadow ? false : true);

View File

@ -657,8 +657,8 @@ bool MainWidget::setForwardDraft(PeerId peerId, const SelectedItemSet &items) {
if (_history->peer() == peer) {
_history->cancelReply();
}
Ui::showPeerHistory(peer, ShowAtUnreadMsgId);
_history->onClearSelected();
Ui::showPeerHistory(peer, ShowAtUnreadMsgId);
return true;
}