mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Close double limits preview box on premium change.
This commit is contained in:
parent
61bad55dbc
commit
707359e371
2 changed files with 9 additions and 1 deletions
|
@ -1484,7 +1484,7 @@ void PreviewBox(
|
|||
if (descriptor.fromSettings) {
|
||||
Data::AmPremiumValue(
|
||||
&controller->session()
|
||||
) | rpl::skip(1) | rpl::start_with_next([=](bool premium) {
|
||||
) | rpl::skip(1) | rpl::start_with_next([=] {
|
||||
box->closeBox();
|
||||
}, box->lifetime());
|
||||
}
|
||||
|
|
|
@ -771,9 +771,17 @@ void Premium::setupContent() {
|
|||
}
|
||||
controller->show(Box([=](not_null<Ui::GenericBox*> box) {
|
||||
DoubledLimitsPreviewBox(box, &controller->session());
|
||||
|
||||
box->addTopButton(st::boxTitleClose, [=] {
|
||||
box->closeBox();
|
||||
});
|
||||
|
||||
Data::AmPremiumValue(
|
||||
&controller->session()
|
||||
) | rpl::skip(1) | rpl::start_with_next([=] {
|
||||
box->closeBox();
|
||||
}, box->lifetime());
|
||||
|
||||
if (controller->session().premium()) {
|
||||
box->addButton(tr::lng_close(), [=] {
|
||||
box->closeBox();
|
||||
|
|
Loading…
Add table
Reference in a new issue