Fix scroll history to down with unread bar.

Regression was introduced in 972b5078f6.

When we show history at a specific message or at unread messages we
need to clear and destroy old showFrom and unreadBar like it is done
in historyLoaded(), otherwise we always scroll to existing unreadBar.
This commit is contained in:
John Preston 2017-05-27 13:23:59 +03:00
parent 9a18ecf93d
commit a1f2fb46f9

View File

@ -1794,6 +1794,9 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
setMsgId(showAtMsgId);
if (_historyInited) {
countHistoryShowFrom();
destroyUnreadBar();
auto item = getItemFromHistoryOrMigrated(_showAtMsgId);
animatedScrollToY(countInitialScrollTop(), item);
highlightMessage(item);