Update settings_ayu.cpp

This commit is contained in:
Neurotoxin001 2025-07-10 14:38:06 +03:00 committed by GitHub
parent f4c01a6a20
commit 8bea85e597
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -846,6 +846,48 @@ void SetupQoLToggles(not_null<Ui::VerticalLayout*> container) {
},
container->lifetime());
AddSkip(container);
AddDivider(container);
AddSkip(container);
AddButtonWithIcon(
container,
tr::ayu_HideChannelReactions(),
st::settingsButtonNoIcon
)->toggleOn(
rpl::single(!settings->hideChannelReactions)
)->toggledValue(
) | rpl::filter(
[=](bool enabled)
{
return (!enabled != settings->hideChannelReactions);
}) | start_with_next(
[=](bool enabled)
{
AyuSettings::set_hideChannelReactions(!enabled);
AyuSettings::save();
},
container->lifetime());
AddButtonWithIcon(
container,
tr::ayu_HideGroupReactions(),
st::settingsButtonNoIcon
)->toggleOn(
rpl::single(!settings->hideGroupReactions)
)->toggledValue(
) | rpl::filter(
[=](bool enabled)
{
return (!enabled != settings->hideGroupReactions);
}) | start_with_next(
[=](bool enabled)
{
AyuSettings::set_hideGroupReactions(!enabled);
AyuSettings::save();
},
container->lifetime());
AddButtonWithIcon(
container,
tr::ayu_ShowForwardsCount(),
@ -883,7 +925,6 @@ void SetupQoLToggles(not_null<Ui::VerticalLayout*> container) {
AyuSettings::save();
},
container->lifetime());
}
void SetupAppIcon(not_null<Ui::VerticalLayout*> container) {