Early init ThemeManager.
This commit is contained in:
parent
9ab536efff
commit
43f1d6aacb
@ -182,13 +182,10 @@ void ThemeManager::AccentColors::parse(ParserT &parser) {
|
||||
}
|
||||
|
||||
ThemeManager::ThemeManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) {
|
||||
do_init();
|
||||
}
|
||||
|
||||
void ThemeManager::start_up() {
|
||||
init();
|
||||
}
|
||||
|
||||
void ThemeManager::init() {
|
||||
void ThemeManager::do_init() {
|
||||
if (!td_->auth_manager_->is_authorized() || td_->auth_manager_->is_bot()) {
|
||||
return;
|
||||
}
|
||||
@ -215,7 +212,10 @@ void ThemeManager::init() {
|
||||
accent_colors_ = AccentColors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeManager::init() {
|
||||
do_init();
|
||||
loop();
|
||||
}
|
||||
|
||||
|
@ -106,12 +106,12 @@ class ThemeManager final : public Actor {
|
||||
void parse(ParserT &parser);
|
||||
};
|
||||
|
||||
void start_up() final;
|
||||
|
||||
void loop() final;
|
||||
|
||||
void tear_down() final;
|
||||
|
||||
void do_init();
|
||||
|
||||
static bool is_dark_base_theme(BaseTheme base_theme);
|
||||
|
||||
void on_get_chat_themes(Result<telegram_api::object_ptr<telegram_api::account_Themes>> result);
|
||||
|
Loading…
Reference in New Issue
Block a user