Update notification sound option names.

This commit is contained in:
levlam 2022-04-15 21:03:13 +03:00
parent 104ebaaacb
commit 1c266d65b1
2 changed files with 9 additions and 9 deletions

View File

@ -1720,17 +1720,17 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
}
if (key == "ringtone_duration_max") {
auto setting_value = get_json_value_int(std::move(key_value->value_), key);
G()->shared_config().set_option_integer("notification_tone_duration_max", setting_value);
G()->shared_config().set_option_integer("notification_sound_duration_max", setting_value);
continue;
}
if (key == "ringtone_size_max") {
auto setting_value = get_json_value_int(std::move(key_value->value_), key);
G()->shared_config().set_option_integer("notification_tone_size_max", setting_value);
G()->shared_config().set_option_integer("notification_sound_size_max", setting_value);
continue;
}
if (key == "ringtone_saved_count_max") {
auto setting_value = get_json_value_int(std::move(key_value->value_), key);
G()->shared_config().set_option_integer("notification_tone_count_max", setting_value);
G()->shared_config().set_option_integer("notification_sound_count_max", setting_value);
continue;
}

View File

@ -101,14 +101,14 @@ OptionManager::OptionManager(Td *td, ActorShared<> parent) : td_(td), parent_(st
if (!G()->shared_config().have_option("suggested_video_note_audio_bitrate")) {
G()->shared_config().set_option_integer("suggested_video_note_audio_bitrate", 64);
}
if (!G()->shared_config().have_option("notification_tone_duration_max")) {
G()->shared_config().set_option_integer("notification_tone_duration_max", 5);
if (!G()->shared_config().have_option("notification_sound_duration_max")) {
G()->shared_config().set_option_integer("notification_sound_duration_max", 5);
}
if (!G()->shared_config().have_option("notification_tone_size_max")) {
G()->shared_config().set_option_integer("notification_tone_size_max", 307200);
if (!G()->shared_config().have_option("notification_sound_size_max")) {
G()->shared_config().set_option_integer("notification_sound_size_max", 307200);
}
if (!G()->shared_config().have_option("notification_tone_count_max")) {
G()->shared_config().set_option_integer("notification_tone_count_max", G()->is_test_dc() ? 5 : 100);
if (!G()->shared_config().have_option("notification_sound_count_max")) {
G()->shared_config().set_option_integer("notification_sound_count_max", G()->is_test_dc() ? 5 : 100);
}
G()->shared_config().set_option_integer("utc_time_offset", Clocks::tz_offset());
}