Add StickersManager::after_get_difference.

GitOrigin-RevId: ba5502e640aa704267c97b7b995405375134547b
This commit is contained in:
levlam 2018-12-12 05:55:08 +03:00
parent ca71a74e82
commit 0eff518c4e
4 changed files with 14 additions and 10 deletions

View File

@ -6545,16 +6545,6 @@ void MessagesManager::after_get_difference() {
}
}
if (td_->is_online()) {
// TODO move to StickersManager
td_->stickers_manager_->get_installed_sticker_sets(false, Auto());
td_->stickers_manager_->get_installed_sticker_sets(true, Auto());
td_->stickers_manager_->get_featured_sticker_sets(Auto());
td_->stickers_manager_->get_recent_stickers(false, Auto());
td_->stickers_manager_->get_recent_stickers(true, Auto());
td_->stickers_manager_->get_favorite_stickers(Auto());
}
if (!G()->td_db()->get_binlog_pmc()->isset("fetched_marks_as_unread") && !td_->auth_manager_->is_bot()) {
td_->create_handler<GetDialogUnreadMarksQuery>()->send();
}

View File

@ -4249,6 +4249,17 @@ string StickersManager::remove_emoji_modifiers(string emoji) {
return emoji;
}
void StickersManager::after_get_difference() {
if (td_->is_online()) {
get_installed_sticker_sets(false, Auto());
get_installed_sticker_sets(true, Auto());
get_featured_sticker_sets(Auto());
get_recent_stickers(false, Auto());
get_recent_stickers(true, Auto());
get_favorite_stickers(Auto());
}
}
void StickersManager::get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const {
if (td_->auth_manager_->is_bot()) {
return;

View File

@ -214,6 +214,8 @@ class StickersManager : public Actor {
void on_find_sticker_sets_fail(const string &query, Status &&error);
void after_get_difference();
void get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const;
private:

View File

@ -1095,6 +1095,7 @@ void UpdatesManager::after_get_difference() {
td_->animations_manager_->after_get_difference();
td_->inline_queries_manager_->after_get_difference();
td_->messages_manager_->after_get_difference();
td_->stickers_manager_->after_get_difference();
send_closure_later(td_->notification_manager_actor_, &NotificationManager::after_get_difference);
send_closure(G()->state_manager(), &StateManager::on_synchronized, true);