Add G()->story_manager().

This commit is contained in:
levlam 2023-05-19 16:20:19 +03:00
parent f5208dd8bd
commit 88620d1347
2 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class SponsoredMessageManager;
class StateManager; class StateManager;
class StickersManager; class StickersManager;
class StorageManager; class StorageManager;
class StoryManager;
class Td; class Td;
class TdDb; class TdDb;
class TempAuthKeyWatchdog; class TempAuthKeyWatchdog;
@ -358,6 +359,13 @@ class Global final : public ActorContext {
storage_manager_ = storage_manager; storage_manager_ = storage_manager;
} }
ActorId<StoryManager> story_manager() const {
return story_manager_;
}
void set_story_manager(ActorId<StoryManager> story_manager) {
story_manager_ = story_manager;
}
ActorId<ThemeManager> theme_manager() const { ActorId<ThemeManager> theme_manager() const {
return theme_manager_; return theme_manager_;
} }
@ -522,6 +530,7 @@ class Global final : public ActorContext {
ActorId<SponsoredMessageManager> sponsored_message_manager_; ActorId<SponsoredMessageManager> sponsored_message_manager_;
ActorId<StickersManager> stickers_manager_; ActorId<StickersManager> stickers_manager_;
ActorId<StorageManager> storage_manager_; ActorId<StorageManager> storage_manager_;
ActorId<StoryManager> story_manager_;
ActorId<ThemeManager> theme_manager_; ActorId<ThemeManager> theme_manager_;
ActorId<TopDialogManager> top_dialog_manager_; ActorId<TopDialogManager> top_dialog_manager_;
ActorId<UpdatesManager> updates_manager_; ActorId<UpdatesManager> updates_manager_;

View File

@ -3942,6 +3942,7 @@ void Td::init_managers() {
G()->set_stickers_manager(stickers_manager_actor_.get()); G()->set_stickers_manager(stickers_manager_actor_.get());
story_manager_ = make_unique<StoryManager>(this, create_reference()); story_manager_ = make_unique<StoryManager>(this, create_reference());
story_manager_actor_ = register_actor("StoryManager", story_manager_.get()); story_manager_actor_ = register_actor("StoryManager", story_manager_.get());
G()->set_story_manager(story_manager_actor_.get());
theme_manager_ = make_unique<ThemeManager>(this, create_reference()); theme_manager_ = make_unique<ThemeManager>(this, create_reference());
theme_manager_actor_ = register_actor("ThemeManager", theme_manager_.get()); theme_manager_actor_ = register_actor("ThemeManager", theme_manager_.get());
G()->set_theme_manager(theme_manager_actor_.get()); G()->set_theme_manager(theme_manager_actor_.get());