Remove DialogFilterManager::hide_dialog_filter_new_chats.
This commit is contained in:
parent
1d5d505789
commit
27c3064c56
@ -2070,19 +2070,11 @@ void DialogFilterManager::add_dialog_filter_new_chats(DialogFilterId dialog_filt
|
||||
}
|
||||
}
|
||||
|
||||
td_->create_handler<JoinChatlistUpdatesQuery>(std::move(promise))->send(dialog_filter_id, std::move(dialog_ids));
|
||||
}
|
||||
|
||||
void DialogFilterManager::hide_dialog_filter_new_chats(DialogFilterId dialog_filter_id, Promise<Unit> &&promise) {
|
||||
auto dialog_filter = get_dialog_filter(dialog_filter_id);
|
||||
if (dialog_filter == nullptr) {
|
||||
return promise.set_error(Status::Error(400, "Chat folder not found"));
|
||||
if (dialog_ids.empty()) {
|
||||
td_->create_handler<HideChatlistUpdatesQuery>(std::move(promise))->send(dialog_filter_id);
|
||||
} else {
|
||||
td_->create_handler<JoinChatlistUpdatesQuery>(std::move(promise))->send(dialog_filter_id, std::move(dialog_ids));
|
||||
}
|
||||
if (!dialog_filter->is_shareable()) {
|
||||
return promise.set_error(Status::Error(400, "Chat folder must be shareable"));
|
||||
}
|
||||
|
||||
td_->create_handler<HideChatlistUpdatesQuery>(std::move(promise))->send(dialog_filter_id);
|
||||
}
|
||||
|
||||
void DialogFilterManager::set_dialog_filter_has_my_invite_links(DialogFilterId dialog_filter_id,
|
||||
|
@ -108,8 +108,6 @@ class DialogFilterManager final : public Actor {
|
||||
void add_dialog_filter_new_chats(DialogFilterId dialog_filter_id, vector<DialogId> dialog_ids,
|
||||
Promise<Unit> &&promise);
|
||||
|
||||
void hide_dialog_filter_new_chats(DialogFilterId dialog_filter_id, Promise<Unit> &&promise);
|
||||
|
||||
void on_get_dialog_filter(telegram_api::object_ptr<telegram_api::DialogFilter> filter);
|
||||
|
||||
void get_recommended_dialog_filters(Promise<td_api::object_ptr<td_api::recommendedChatFolders>> &&promise);
|
||||
|
@ -6208,12 +6208,8 @@ void Td::on_request(uint64 id, const td_api::getChatFolderNewChats &request) {
|
||||
void Td::on_request(uint64 id, const td_api::processChatFolderNewChats &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
if (request.added_chat_ids_.empty()) {
|
||||
dialog_filter_manager_->hide_dialog_filter_new_chats(DialogFilterId(request.chat_folder_id_), std::move(promise));
|
||||
} else {
|
||||
dialog_filter_manager_->add_dialog_filter_new_chats(
|
||||
DialogFilterId(request.chat_folder_id_), DialogId::get_dialog_ids(request.added_chat_ids_), std::move(promise));
|
||||
}
|
||||
dialog_filter_manager_->add_dialog_filter_new_chats(
|
||||
DialogFilterId(request.chat_folder_id_), DialogId::get_dialog_ids(request.added_chat_ids_), std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, td_api::setChatTitle &request) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user