Optimized include directives of core_settings header.

This commit is contained in:
23rd 2023-11-15 02:21:07 +03:00
parent baa99be6a5
commit 596460172f
8 changed files with 28 additions and 20 deletions

View file

@ -26,6 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_keys.h"
#include "main/main_session.h"
#include "media/audio/media_audio.h"
#include "platform/platform_notifications_manager.h"
#include "settings/settings_common.h"
#include "ui/boxes/confirm_box.h"
#include "ui/text/format_values.h"

View file

@ -7,19 +7,17 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "core/core_settings.h"
#include "boxes/send_files_box.h"
#include "history/view/history_view_quick_action.h"
#include "ui/widgets/fields/input_field.h"
#include "storage/serialize_common.h"
#include "window/section_widget.h"
#include "base/platform/base_platform_info.h"
#include "webrtc/webrtc_create_adm.h"
#include "media/player/media_player_instance.h"
#include "media/media_common.h"
#include "ui/gl/gl_detection.h"
#include "lang/lang_keys.h"
#include "calls/group/calls_group_common.h"
#include "history/view/history_view_quick_action.h"
#include "lang/lang_keys.h"
#include "platform/platform_notifications_manager.h"
#include "spellcheck/spellcheck_types.h"
#include "storage/serialize_common.h"
#include "ui/gl/gl_detection.h"
#include "ui/widgets/fields/input_field.h"
#include "webrtc/webrtc_create_adm.h"
#include "window/section_widget.h"
namespace Core {
namespace {
@ -1307,6 +1305,17 @@ auto Settings::DeserializePlaybackSpeed(qint32 speed) -> PlaybackSpeed {
return validate(std::clamp(speed / 100., kSpeedMin, kSpeedMax));
}
bool Settings::nativeNotifications() const {
return _nativeNotifications.value_or(
Platform::Notifications::ByDefault());
}
void Settings::setNativeNotifications(bool value) {
_nativeNotifications = (value == Platform::Notifications::ByDefault())
? std::nullopt
: std::make_optional(value);
}
void Settings::setTranslateButtonEnabled(bool value) {
_translateButtonEnabled = value;
}

View file

@ -11,7 +11,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "media/media_common.h"
#include "window/themes/window_themes_embedded.h"
#include "ui/chat/attach/attach_send_files_way.h"
#include "platform/platform_notifications_manager.h"
#include "base/flags.h"
#include "emoji.h"
@ -221,14 +220,10 @@ public:
void setNotifyView(NotifyView value) {
_notifyView = value;
}
[[nodiscard]] bool nativeNotifications() const {
return _nativeNotifications.value_or(Platform::Notifications::ByDefault());
}
void setNativeNotifications(bool value) {
_nativeNotifications = (value == Platform::Notifications::ByDefault())
? std::nullopt
: std::make_optional(value);
}
[[nodiscard]] bool nativeNotifications() const;
void setNativeNotifications(bool value);
[[nodiscard]] int notificationsCount() const {
return _notificationsCount;
}

View file

@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat_participant_status.h"
#include "data/data_channel.h"
#include "data/data_changes.h"
#include "data/data_message_reaction_id.h"
#include "data/data_photo.h"
#include "data/data_folder.h"
#include "data/data_forum.h"

View file

@ -67,6 +67,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_web_page.h"
#include "chat_helpers/stickers_gift_box_pack.h"
#include "payments/payments_checkout_process.h" // CheckoutProcess::Start.
#include "platform/platform_notifications_manager.h"
#include "spellcheck/spellcheck_highlight_syntax.h"
#include "styles/style_dialogs.h"

View file

@ -29,6 +29,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_domain.h"
#include "main/main_session.h"
#include "main/main_session_settings.h"
#include "platform/platform_notifications_manager.h"
#include "window/window_controller.h"
#include "window/window_session_controller.h"
#include "apiwrap.h"

View file

@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "core/core_settings.h"
#include "platform/platform_notifications_manager.h"
#include "platform/platform_specific.h"
#include "lang/lang_keys.h"

View file

@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
namespace style {
struct colorizer;
} // namespace style