Cancel more requests when closing.
GitOrigin-RevId: 5d7f37cf8abf45cfe37f3ab589f85a5e96417ffb
This commit is contained in:
parent
48a15fb0d3
commit
a7d50c1ae8
|
@ -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) {
|
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
|
// TODO invokeAfter and log event
|
||||||
auto file_view = td_->file_manager_->get_file_view(animation_id);
|
auto file_view = td_->file_manager_->get_file_view(animation_id);
|
||||||
CHECK(file_view.has_remote_location());
|
CHECK(file_view.has_remote_location());
|
||||||
|
|
|
@ -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) {
|
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
|
// TODO invokeAfter and log event
|
||||||
auto file_view = td_->file_manager_->get_file_view(sticker_id);
|
auto file_view = td_->file_manager_->get_file_view(sticker_id);
|
||||||
CHECK(file_view.has_remote_location());
|
CHECK(file_view.has_remote_location());
|
||||||
|
|
Reference in New Issue
Block a user