mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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) {
|
if (descriptor.fromSettings) {
|
||||||
Data::AmPremiumValue(
|
Data::AmPremiumValue(
|
||||||
&controller->session()
|
&controller->session()
|
||||||
) | rpl::skip(1) | rpl::start_with_next([=](bool premium) {
|
) | rpl::skip(1) | rpl::start_with_next([=] {
|
||||||
box->closeBox();
|
box->closeBox();
|
||||||
}, box->lifetime());
|
}, box->lifetime());
|
||||||
}
|
}
|
||||||
|
|
|
@ -771,9 +771,17 @@ void Premium::setupContent() {
|
||||||
}
|
}
|
||||||
controller->show(Box([=](not_null<Ui::GenericBox*> box) {
|
controller->show(Box([=](not_null<Ui::GenericBox*> box) {
|
||||||
DoubledLimitsPreviewBox(box, &controller->session());
|
DoubledLimitsPreviewBox(box, &controller->session());
|
||||||
|
|
||||||
box->addTopButton(st::boxTitleClose, [=] {
|
box->addTopButton(st::boxTitleClose, [=] {
|
||||||
box->closeBox();
|
box->closeBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Data::AmPremiumValue(
|
||||||
|
&controller->session()
|
||||||
|
) | rpl::skip(1) | rpl::start_with_next([=] {
|
||||||
|
box->closeBox();
|
||||||
|
}, box->lifetime());
|
||||||
|
|
||||||
if (controller->session().premium()) {
|
if (controller->session().premium()) {
|
||||||
box->addButton(tr::lng_close(), [=] {
|
box->addButton(tr::lng_close(), [=] {
|
||||||
box->closeBox();
|
box->closeBox();
|
||||||
|
|
Loading…
Add table
Reference in a new issue