Merge remote-tracking branch 'td/master'
This commit is contained in:
commit
e5a7f26b7b
@ -106,13 +106,20 @@ void RecentDialogList::load_dialogs(Promise<Unit> &&promise) {
|
||||
dialog_ids.push_back(DialogId(to_integer<int64>(found_dialog)));
|
||||
}
|
||||
}
|
||||
if (!dialog_ids.empty() && !G()->parameters().use_chat_info_db) {
|
||||
td_->messages_manager_->get_dialogs_from_list(
|
||||
DialogListId(FolderId::main()), 102,
|
||||
PromiseCreator::lambda([promise = mpas.get_promise()](td_api::object_ptr<td_api::chats> &&chats) mutable {
|
||||
promise.set_value(Unit());
|
||||
}));
|
||||
td_->contacts_manager_->search_contacts("", 1, mpas.get_promise());
|
||||
if (!dialog_ids.empty()) {
|
||||
if (G()->parameters().use_chat_info_db) {
|
||||
td_->messages_manager_->load_dialogs(
|
||||
std::move(dialog_ids),
|
||||
PromiseCreator::lambda(
|
||||
[promise = mpas.get_promise()](vector<DialogId> dialog_ids) mutable { promise.set_value(Unit()); }));
|
||||
} else {
|
||||
td_->messages_manager_->get_dialogs_from_list(
|
||||
DialogListId(FolderId::main()), 102,
|
||||
PromiseCreator::lambda([promise = mpas.get_promise()](td_api::object_ptr<td_api::chats> &&chats) mutable {
|
||||
promise.set_value(Unit());
|
||||
}));
|
||||
td_->contacts_manager_->search_contacts("", 1, mpas.get_promise());
|
||||
}
|
||||
}
|
||||
|
||||
lock.set_value(Unit());
|
||||
|
@ -112,6 +112,7 @@ TDJSON_EXPORT void td_json_client_destroy(void *client);
|
||||
* Also note that all updates and responses to requests must be applied in the order they were received for consistency.
|
||||
* Some TDLib requests can be executed synchronously from any thread using td_execute.
|
||||
* TDLib client instances are destroyed automatically after they are closed.
|
||||
* All TDLib client instances must be closed before application termination to ensure data consistency.
|
||||
*
|
||||
* General pattern of usage:
|
||||
* \code
|
||||
|
Loading…
Reference in New Issue
Block a user