Skip to content

Commit

Permalink
Fix a glitch in history re-open while loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 22, 2023
1 parent 8245660 commit eeb8af3
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Telegram/SourceFiles/history/history_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2031,12 +2031,19 @@ void HistoryWidget::showHistory(
}
const auto canShowNow = _history->isReadyFor(showAtMsgId);
if (!canShowNow) {
DEBUG_LOG(("JumpToEnd(%1, %2, %3): Showing delayed at %4."
).arg(_history->peer->name()
).arg(_history->inboxReadTillId().bare
).arg(Logs::b(_history->loadedAtBottom())
).arg(showAtMsgId.bare));
delayedShowAt(showAtMsgId);
if (!_firstLoadRequest) {
DEBUG_LOG(("JumpToEnd(%1, %2, %3): Showing delayed at %4."
).arg(_history->peer->name()
).arg(_history->inboxReadTillId().bare
).arg(Logs::b(_history->loadedAtBottom())
).arg(showAtMsgId.bare));
delayedShowAt(showAtMsgId);
} else if (_showAtMsgId != showAtMsgId) {
clearAllLoadRequests();
setMsgId(showAtMsgId);
firstLoadMessages();
doneShow();
}
} else {
_history->forgetScrollState();
if (_migrated) {
Expand Down

0 comments on commit eeb8af3

Please sign in to comment.