chore: refactor settings

This commit is contained in:
AlexeyZavar
2025-05-05 20:36:16 +03:00
parent 4870d59a43
commit 409165dec6
65 changed files with 647 additions and 651 deletions
@@ -482,9 +482,9 @@ auto ChatThemeValueFromPeer(
peer
) | rpl::map([=](ResolvedTheme resolved)
-> rpl::producer<std::shared_ptr<Ui::ChatTheme>> {
const auto settings = &AyuSettings::getInstance();
const auto& settings = AyuSettings::getInstance();
// this check ensures that background is not a pattern wallpaper in a private chat
if (settings->disableCustomBackgrounds && resolved.paper && resolved.paper->media) {
if (settings.disableCustomBackgrounds && resolved.paper && resolved.paper->media) {
resolved.paper = std::nullopt;
}