Removed display of credits button in settings when user has no credits.
This commit is contained in:
parent
57ecc2be1d
commit
02bd2bca64
|
@ -491,9 +491,18 @@ void SetupPremium(
|
||||||
controller->setPremiumRef("settings");
|
controller->setPremiumRef("settings");
|
||||||
showOther(PremiumId());
|
showOther(PremiumId());
|
||||||
});
|
});
|
||||||
|
{
|
||||||
|
const auto wrap = container->add(
|
||||||
|
object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
||||||
|
container,
|
||||||
|
object_ptr<Ui::VerticalLayout>(container)));
|
||||||
|
wrap->toggleOn(
|
||||||
|
controller->session().creditsValue(
|
||||||
|
) | rpl::map(rpl::mappers::_1 > 0));
|
||||||
|
wrap->finishAnimating();
|
||||||
AddPremiumStar(
|
AddPremiumStar(
|
||||||
AddButtonWithLabel(
|
AddButtonWithLabel(
|
||||||
container,
|
wrap->entity(),
|
||||||
tr::lng_credits_summary_title(),
|
tr::lng_credits_summary_title(),
|
||||||
controller->session().creditsValue(
|
controller->session().creditsValue(
|
||||||
) | rpl::map([=](uint64 c) {
|
) | rpl::map([=](uint64 c) {
|
||||||
|
@ -505,6 +514,7 @@ void SetupPremium(
|
||||||
controller->setPremiumRef("settings");
|
controller->setPremiumRef("settings");
|
||||||
showOther(CreditsId());
|
showOther(CreditsId());
|
||||||
});
|
});
|
||||||
|
}
|
||||||
const auto button = AddButtonWithIcon(
|
const auto button = AddButtonWithIcon(
|
||||||
container,
|
container,
|
||||||
tr::lng_business_title(),
|
tr::lng_business_title(),
|
||||||
|
|
Loading…
Reference in New Issue