Skip to content

Commit

Permalink
Remove redundant check, existing also in get_history_impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Jun 7, 2023
1 parent 677219a commit 7d83f2e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions td/telegram/MessagesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23398,15 +23398,10 @@ void MessagesManager::load_messages_impl(const Dialog *d, MessageId from_message
only_local = true;
}
bool from_database = (left_tries > 2 || only_local) && G()->use_message_database();

if (from_message_id == MessageId()) {
get_history_from_the_end_impl(d, from_database, only_local, std::move(promise), "load_messages_impl");
return;
}
if ((!d->first_database_message_id.is_valid() || from_message_id <= d->first_database_message_id) &&
!d->have_full_history) {
from_database = false;
}
if (offset >= -1) {
// get history before some server or local message
limit = min(max(limit + offset + 1, MAX_GET_HISTORY / 2), MAX_GET_HISTORY);
Expand Down

0 comments on commit 7d83f2e

Please sign in to comment.