diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 81cedf881..c5e90ad25 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -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()->send(); } diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 4c43351c3..d84ca6b26 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -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> &updates) const { if (td_->auth_manager_->is_bot()) { return; diff --git a/td/telegram/StickersManager.h b/td/telegram/StickersManager.h index c584e9c9a..23337d60c 100644 --- a/td/telegram/StickersManager.h +++ b/td/telegram/StickersManager.h @@ -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> &updates) const; private: diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index e1fbc2363..b1cec649f 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -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);