Clear *_database_message_id when receive no messages from the database.
GitOrigin-RevId: 9c43ed5052a3c389de78573b3fa58a2a10c40572
This commit is contained in:
parent
0181982749
commit
01a1538570
@ -14951,8 +14951,13 @@ void MessagesManager::on_get_history_from_database(DialogId dialog_id, MessageId
|
||||
<< " with offset " << offset << " and limit " << limit << ". First database message is "
|
||||
<< d->first_database_message_id << ", have_full_history = " << d->have_full_history;
|
||||
|
||||
if (messages.empty() && from_the_end && d->have_full_history && d->messages == nullptr) {
|
||||
if (messages.empty() && from_the_end && d->messages == nullptr) {
|
||||
if (d->have_full_history) {
|
||||
set_dialog_is_empty(d, "on_get_history_from_database empty");
|
||||
} else if (d->last_database_message_id.is_valid()) {
|
||||
set_dialog_first_database_message_id(d, MessageId(), "on_get_history_from_database empty");
|
||||
set_dialog_last_database_message_id(d, MessageId(), "on_get_history_from_database empty");
|
||||
}
|
||||
}
|
||||
|
||||
bool have_next = false;
|
||||
|
Loading…
Reference in New Issue
Block a user