Improve name of updateDefaultBackground update.

This commit is contained in:
levlam 2023-12-19 14:21:46 +03:00
parent b4ea9f8a18
commit 325f56dfe0
3 changed files with 12 additions and 12 deletions

View File

@ -6488,8 +6488,8 @@ updateSavedAnimations animation_ids:vector<int32> = 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<int64> = 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<chatTheme> = Update;

View File

@ -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<td_api::updateSelectedBackground> BackgroundManager::get_update_selected_background_object(
td_api::object_ptr<td_api::updateDefaultBackground> BackgroundManager::get_update_default_background_object(
bool for_dark_theme) const {
return td_api::make_object<td_api::updateSelectedBackground>(
return td_api::make_object<td_api::updateDefaultBackground>(
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<FileId> BackgroundManager::prepare_input_file(const tl_object_ptr<td_api::InputFile> &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<td_api::object_ptr<td_api::Upda
return;
}
updates.push_back(get_update_selected_background_object(false));
updates.push_back(get_update_selected_background_object(true));
updates.push_back(get_update_default_background_object(false));
updates.push_back(get_update_default_background_object(true));
}
} // namespace td

View File

@ -116,11 +116,11 @@ class BackgroundManager final : public Actor {
telegram_api::object_ptr<telegram_api::InputWallPaper> &&input_wallpaper,
Promise<Unit> &&promise) const;
td_api::object_ptr<td_api::updateSelectedBackground> get_update_selected_background_object(bool for_dark_theme) const;
td_api::object_ptr<td_api::updateDefaultBackground> get_update_default_background_object(bool for_dark_theme) const;
td_api::object_ptr<td_api::backgrounds> 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);