Minor fixes.
This commit is contained in:
parent
017949d861
commit
88ce431f39
@ -531,7 +531,7 @@ class DownloadManagerImpl final : public DownloadManager {
|
||||
}
|
||||
} else {
|
||||
auto search_text = r_search_text.move_as_ok();
|
||||
// TODO: This is a race. Synchronous call to MessagesManager would be better.
|
||||
// TODO: This is a race. Synchronous call would be better.
|
||||
hints_.add(download_id, search_text.empty() ? string(" ") : search_text);
|
||||
}
|
||||
promise.set_value(Unit());
|
||||
|
@ -59,7 +59,7 @@ class DownloadManager : public Actor {
|
||||
void parse(ParserT &parser);
|
||||
};
|
||||
|
||||
// to make DownloadManager testable all interactions with G() must be hidden in this probably monstrous interface
|
||||
// Callback is needed to make DownloadManager testable
|
||||
class Callback {
|
||||
public:
|
||||
virtual ~Callback() = default;
|
||||
|
@ -101,8 +101,7 @@ std::shared_ptr<FileManager::DownloadCallback> DownloadManagerCallback::make_dow
|
||||
ActorShared<DownloadManager> download_manager_;
|
||||
|
||||
void send_update(FileId file_id, bool is_paused) const {
|
||||
auto td = G()->td().get_actor_unsafe();
|
||||
auto file_view = td->file_manager_->get_file_view(file_id);
|
||||
auto file_view = td_->file_manager_->get_file_view(file_id);
|
||||
send_closure_later(download_manager_, &DownloadManager::update_file_download_state, file_id,
|
||||
file_view.local_total_size(), file_view.size(), file_view.expected_size(), is_paused);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "td/telegram/DownloadManager.h"
|
||||
#include "td/telegram/files/FileId.h"
|
||||
#include "td/telegram/files/FileManager.h"
|
||||
#include "td/telegram/files/FileSourceId.h"
|
||||
#include "td/telegram/td_api.h"
|
||||
|
||||
@ -15,6 +16,8 @@
|
||||
|
||||
#include "td/utils/common.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace td {
|
||||
|
||||
class Td;
|
||||
|
@ -37486,7 +37486,7 @@ unique_ptr<MessagesManager::Dialog> MessagesManager::parse_dialog(DialogId dialo
|
||||
LOG_CHECK(dialog_id.is_valid()) << "Can't repair " << dialog_id << ' ' << d->dialog_id << ' ' << status << ' '
|
||||
<< source << ' ' << format::as_hex_dump<4>(value.as_slice());
|
||||
|
||||
LOG(ERROR) << "Repair broken " << dialog_id << ': ' << status << ' ' << format::as_hex_dump<4>(value.as_slice());
|
||||
LOG(ERROR) << "Repair broken " << dialog_id << ": " << status << ' ' << format::as_hex_dump<4>(value.as_slice());
|
||||
|
||||
// just clean all known data about the dialog
|
||||
d = make_unique<Dialog>();
|
||||
|
Loading…
Reference in New Issue
Block a user