Beta version 4.6.9: Fix critical loading bug.

Regression was introduced in ec6dda47ae.

The HistoryWidget was infinitely trying to load history down even
when there was nothing to load and kept flooding with requests.
This commit is contained in:
John Preston 2023-03-10 11:59:05 +04:00
parent 37d3ac2cca
commit fadd19bca4
1 changed files with 4 additions and 2 deletions

View File

@ -3358,8 +3358,10 @@ void HistoryWidget::loadMessagesDown() {
auto loadMigrated = _migrated && !(_migrated->isEmpty() || _migrated->loadedAtBottom() || (!_history->isEmpty() && !_history->loadedAtTop()));
auto from = loadMigrated ? _migrated : _history;
if (from->loadedAtBottom() && _sponsoredMessagesStateKnown) {
session().data().sponsoredMessages().request(_history, nullptr);
if (from->loadedAtBottom()) {
if (_sponsoredMessagesStateKnown) {
session().data().sponsoredMessages().request(_history, nullptr);
}
return;
}