Preload chats from server if there is no more chats in the database.

GitOrigin-RevId: b80b27fc423f9059edc103c94678dd2fd8fb01aa
This commit is contained in:
levlam 2018-02-26 21:31:10 +03:00
parent 57a6071c0f
commit 8d16c86c73

View File

@ -10866,6 +10866,8 @@ void MessagesManager::preload_dialog_list(void *messages_manager_void) {
if (messages_manager->last_loaded_database_dialog_date_ < messages_manager->last_database_server_dialog_date_) {
// if there are some dialogs in database, preload some of them
messages_manager->load_dialog_list_from_database(20, Auto());
} else if (messages_manager->last_dialog_date_ != MAX_DIALOG_DATE) {
messages_manager->load_dialog_list(Auto());
}
}