Cancel more requests when closing.

GitOrigin-RevId: 5d7f37cf8abf45cfe37f3ab589f85a5e96417ffb
This commit is contained in:
levlam 2019-04-08 17:57:41 +03:00
parent 48a15fb0d3
commit a7d50c1ae8
2 changed files with 8 additions and 0 deletions

View File

@ -621,6 +621,10 @@ void AnimationsManager::add_saved_animation(const tl_object_ptr<td_api::InputFil
}
void AnimationsManager::send_save_gif_query(FileId animation_id, bool unsave, Promise<Unit> &&promise) {
if (G()->close_flag()) {
return promise.set_error(Status::Error(500, "Request aborted"));
}
// TODO invokeAfter and log event
auto file_view = td_->file_manager_->get_file_view(animation_id);
CHECK(file_view.has_remote_location());

View File

@ -4293,6 +4293,10 @@ void StickersManager::add_favorite_sticker_inner(FileId sticker_id, Promise<Unit
}
void StickersManager::send_fave_sticker_query(FileId sticker_id, bool unsave, Promise<Unit> &&promise) {
if (G()->close_flag()) {
return promise.set_error(Status::Error(500, "Request aborted"));
}
// TODO invokeAfter and log event
auto file_view = td_->file_manager_->get_file_view(sticker_id);
CHECK(file_view.has_remote_location());