Add StarManager to Global.

This commit is contained in:
levlam 2024-06-27 21:21:20 +03:00
parent 8b1ed9d258
commit 218877c0ac
2 changed files with 10 additions and 0 deletions

View File

@ -70,6 +70,7 @@ class ReactionManager;
class SavedMessagesManager;
class SecretChatsManager;
class SponsoredMessageManager;
class StarManager;
class StateManager;
class StickersManager;
class StorageManager;
@ -451,6 +452,13 @@ class Global final : public ActorContext {
sponsored_message_manager_ = sponsored_message_manager;
}
ActorId<StarManager> star_manager() const {
return star_manager_;
}
void set_star_manager(ActorId<StarManager> star_manager) {
star_manager_ = star_manager;
}
ActorId<StickersManager> stickers_manager() const {
return stickers_manager_;
}
@ -679,6 +687,7 @@ class Global final : public ActorContext {
ActorId<SavedMessagesManager> saved_messages_manager_;
ActorId<SecretChatsManager> secret_chats_manager_;
ActorId<SponsoredMessageManager> sponsored_message_manager_;
ActorId<StarManager> star_manager_;
ActorId<StickersManager> stickers_manager_;
ActorId<StorageManager> storage_manager_;
ActorId<StoryManager> story_manager_;

View File

@ -3831,6 +3831,7 @@ void Td::init_managers() {
G()->set_sponsored_message_manager(sponsored_message_manager_actor_.get());
star_manager_ = make_unique<StarManager>(this, create_reference());
star_manager_actor_ = register_actor("StarManager", star_manager_.get());
G()->set_star_manager(star_manager_actor_.get());
statistics_manager_ = make_unique<StatisticsManager>(this, create_reference());
statistics_manager_actor_ = register_actor("StatisticsManager", statistics_manager_.get());
stickers_manager_ = make_unique<StickersManager>(this, create_reference());