chore: add hint

This commit is contained in:
AlexeyZavar
2026-04-26 02:25:08 +03:00
parent e96acf011b
commit 3708680aed
4 changed files with 15 additions and 9 deletions
+1
View File
@@ -7990,6 +7990,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_DontSendUploadProgress" = "Don't Send Typing";
"ayu_SendOfflinePacketAfterOnline" = "Go Offline Automatically";
"ayu_GhostModeOptionLongTapDescription" = "Long-press any option to prevent it from changing when toggling Ghost Mode.";
"ayu_GhostModeOptionShiftDescription" = "Click with SHIFT on any option to prevent it from changing when toggling Ghost Mode.";
"ayu_MarkReadAfterAction" = "Read on Interact";
"ayu_MarkReadAfterActionDescription" = "Automatically marks a message as read when you send a new one or tap a reaction.";
"ayu_MarkReadAfterSend" = "Send";
@@ -372,7 +372,11 @@ void BuildGhostEssentials(SectionBuilder &builder) {
};
auto collapsible = AddCollapsibleToggle(
container, tr::ayu_GhostModeToggle(), std::move(checkboxes), true);
container,
tr::ayu_GhostModeToggle(),
std::move(checkboxes),
true,
tr::ayu_GhostModeOptionShiftDescription(tr::now));
state->refreshCheckboxes = std::move(collapsible.refresh);
if (wctx.highlights && collapsible.widget) {
wctx.highlights->push_back(std::make_pair(
@@ -325,7 +325,8 @@ not_null<Ui::RpWidget*> AddInnerToggle(not_null<Ui::VerticalLayout*> container,
CollapsibleToggleResult AddCollapsibleToggle(not_null<Ui::VerticalLayout*> container,
rpl::producer<QString> title,
std::vector<NestedEntry> checkboxes,
bool toggledWhenAll) {
bool toggledWhenAll,
QString description) {
struct CheckboxEntry {
not_null<Ui::AbstractCheckView*> checkView;
Ui::Checkbox *checkbox = nullptr;
@@ -417,12 +418,6 @@ CollapsibleToggleResult AddCollapsibleToggle(not_null<Ui::VerticalLayout*> conta
anim::type::normal);
});
checkView->checkedChanges(
) | on_next([=](bool checked)
{
},
verticalLayout->lifetime());
checkView->checkedValue(
) | on_next([=](bool enabled)
{
@@ -440,6 +435,11 @@ CollapsibleToggleResult AddCollapsibleToggle(not_null<Ui::VerticalLayout*> conta
}
}
if (!description.isEmpty()) {
Ui::AddDividerText(verticalLayout, rpl::single(std::move(description)));
Ui::AddSkip(verticalLayout);
}
// Apply initial lock visuals.
for (auto i = 0u; i < cState->entries.size(); ++i) {
const auto &entry = cState->checkboxes[i];
@@ -51,7 +51,8 @@ struct CollapsibleToggleResult {
CollapsibleToggleResult AddCollapsibleToggle(not_null<Ui::VerticalLayout*> container,
rpl::producer<QString> title,
std::vector<NestedEntry> checkboxes,
bool toggledWhenAll);
bool toggledWhenAll,
QString description = QString());
void AddChooseButtonWithIconAndRightTextInner(not_null<Ui::VerticalLayout*> container,
not_null<Window::SessionController*> controller,