Fix recent dialog list loading.
This commit is contained in:
parent
48025d969c
commit
bcfc2a7dc1
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user