Fix load requests cancel on history change.

This commit is contained in:
John Preston 2020-02-24 13:13:48 +04:00
parent 91a6632a1b
commit 6ded5b74d0
1 changed files with 2 additions and 1 deletions

View File

@ -1717,7 +1717,6 @@ void HistoryWidget::showHistory(
clearReplyReturns(); clearReplyReturns();
if (_history) { if (_history) {
clearAllLoadRequests();
if (Ui::InFocusChain(_list)) { if (Ui::InFocusChain(_list)) {
// Removing focus from list clears selected and updates top bar. // Removing focus from list clears selected and updates top bar.
setFocus(); setFocus();
@ -1736,6 +1735,8 @@ void HistoryWidget::showHistory(
destroyPinnedBar(); destroyPinnedBar();
_membersDropdown.destroy(); _membersDropdown.destroy();
_scrollToAnimation.stop(); _scrollToAnimation.stop();
clearAllLoadRequests();
_history = _migrated = nullptr; _history = _migrated = nullptr;
_list = nullptr; _list = nullptr;
_peer = nullptr; _peer = nullptr;