Return back changes in DownloadManager.
This commit is contained in:
parent
f1cf7bdc3f
commit
1607707ef8
@ -134,14 +134,6 @@ class DownloadManagerImpl final : public DownloadManager {
|
||||
return remove_file(file_id, {}, false);
|
||||
}
|
||||
|
||||
Status change_search_text(FileId file_id, FileSourceId file_source_id, string search_text) final {
|
||||
TRY_STATUS(check_is_active());
|
||||
TRY_RESULT(file_info_ptr, get_file_info(file_id, file_source_id));
|
||||
auto &file_info = *file_info_ptr;
|
||||
hints_.add(file_info.download_id, search_text.empty() ? string(" ") : search_text);
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status remove_all_files(bool only_active, bool only_completed, bool delete_from_cache) final {
|
||||
TRY_STATUS(check_is_active());
|
||||
vector<FileId> to_remove;
|
||||
@ -182,6 +174,18 @@ class DownloadManagerImpl final : public DownloadManager {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status change_search_text(FileId file_id, FileSourceId file_source_id, string search_text) final {
|
||||
if (!is_search_inited_) {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
TRY_STATUS(check_is_active());
|
||||
TRY_RESULT(file_info_ptr, get_file_info(file_id, file_source_id));
|
||||
auto &file_info = *file_info_ptr;
|
||||
hints_.add(file_info.download_id, search_text.empty() ? string(" ") : search_text);
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
void hints_synchronized(Result<Unit>) {
|
||||
if (G()->close_flag()) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user