mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Added settings link for global TTL to TTL box.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace TTLMenu {
|
||||
struct Args {
|
||||
std::shared_ptr<Ui::Show> show;
|
||||
TimeId startTtl;
|
||||
rpl::producer<QString> about;
|
||||
rpl::producer<TextWithEntities> about;
|
||||
Fn<void(TimeId)> callback;
|
||||
bool hideDisable = false;
|
||||
};
|
||||
|
@@ -94,11 +94,24 @@ Args TTLValidator::createArgs() const {
|
||||
}).send();
|
||||
show->hideLayer();
|
||||
};
|
||||
auto about = peer->isUser()
|
||||
auto about1 = peer->isUser()
|
||||
? tr::lng_ttl_edit_about(lt_user, rpl::single(peer->shortName()))
|
||||
: peer->isBroadcast()
|
||||
? tr::lng_ttl_edit_about_channel()
|
||||
: tr::lng_ttl_edit_about_group();
|
||||
auto about2 = tr::lng_ttl_edit_about2(
|
||||
lt_link,
|
||||
tr::lng_ttl_edit_about2_link(
|
||||
) | rpl::map([=](const QString &s) {
|
||||
return Ui::Text::Link(s, "tg://settings/auto_delete");
|
||||
}),
|
||||
Ui::Text::WithEntities);
|
||||
auto about = rpl::combine(
|
||||
std::move(about1),
|
||||
std::move(about2)
|
||||
) | rpl::map([](const QString &s1, TextWithEntities &&s2) {
|
||||
return TextWithEntities{ s1 }.append(u"\n\n"_q).append(std::move(s2));
|
||||
});
|
||||
const auto ttl = peer->messagesTTL();
|
||||
return { std::move(show), ttl, std::move(about), std::move(callback) };
|
||||
}
|
||||
|
Reference in New Issue
Block a user