diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index fd2f69b40..54b6d236f 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -6488,8 +6488,8 @@ updateSavedAnimations animation_ids:vector = Update; //@description The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time @notification_sound_ids The new list of identifiers of saved notification sounds updateSavedNotificationSounds notification_sound_ids:vector = Update; -//@description The selected background has changed @for_dark_theme True, if background for dark theme has changed @background The new selected background; may be null -updateSelectedBackground for_dark_theme:Bool background:background = Update; +//@description The default background has changed @for_dark_theme True, if default background for dark theme has changed @background The new default background; may be null +updateDefaultBackground for_dark_theme:Bool background:background = Update; //@description The list of available chat themes has changed @chat_themes The new list of chat themes updateChatThemes chat_themes:vector = Update; diff --git a/td/telegram/BackgroundManager.cpp b/td/telegram/BackgroundManager.cpp index b12855716..5e7fec583 100644 --- a/td/telegram/BackgroundManager.cpp +++ b/td/telegram/BackgroundManager.cpp @@ -480,7 +480,7 @@ void BackgroundManager::start_up() { } } - send_update_selected_background(for_dark_theme); + send_update_default_background(for_dark_theme); } } @@ -628,15 +628,15 @@ void BackgroundManager::on_load_background_from_database(string name, string val set_promises(promises); } -td_api::object_ptr BackgroundManager::get_update_selected_background_object( +td_api::object_ptr BackgroundManager::get_update_default_background_object( bool for_dark_theme) const { - return td_api::make_object( + return td_api::make_object( for_dark_theme, get_background_object(set_background_id_[for_dark_theme], for_dark_theme, &set_background_type_[for_dark_theme])); } -void BackgroundManager::send_update_selected_background(bool for_dark_theme) const { - send_closure(G()->td(), &Td::send_update, get_update_selected_background_object(for_dark_theme)); +void BackgroundManager::send_update_default_background(bool for_dark_theme) const { + send_closure(G()->td(), &Td::send_update, get_update_default_background_object(for_dark_theme)); } Result BackgroundManager::prepare_input_file(const tl_object_ptr &input_file) { @@ -941,7 +941,7 @@ void BackgroundManager::set_background_id(BackgroundId background_id, const Back set_background_type_[for_dark_theme] = type; save_background_id(for_dark_theme); - send_update_selected_background(for_dark_theme); + send_update_default_background(for_dark_theme); } void BackgroundManager::save_local_backgrounds(bool for_dark_theme) { @@ -1464,8 +1464,8 @@ void BackgroundManager::get_current_state(vector &&input_wallpaper, Promise &&promise) const; - td_api::object_ptr get_update_selected_background_object(bool for_dark_theme) const; + td_api::object_ptr get_update_default_background_object(bool for_dark_theme) const; td_api::object_ptr get_backgrounds_object(bool for_dark_theme) const; - void send_update_selected_background(bool for_dark_theme) const; + void send_update_default_background(bool for_dark_theme) const; void set_max_local_background_id(BackgroundId background_id);