mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix premium gifting recipient choosing.
This commit is contained in:
parent
5810149a77
commit
3d114131e0
2 changed files with 10 additions and 7 deletions
|
@ -897,6 +897,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_settings_gift_premium_users_confirm" = "Proceed";
|
"lng_settings_gift_premium_users_confirm" = "Proceed";
|
||||||
"lng_settings_gift_premium_users_error#one" = "You can select maximum {count} user.";
|
"lng_settings_gift_premium_users_error#one" = "You can select maximum {count} user.";
|
||||||
"lng_settings_gift_premium_users_error#other" = "You can select maximum {count} users.";
|
"lng_settings_gift_premium_users_error#other" = "You can select maximum {count} users.";
|
||||||
|
"lng_settings_gift_premium_choose" = "Please choose at least one recipient.";
|
||||||
|
|
||||||
"lng_backgrounds_header" = "Choose Wallpaper";
|
"lng_backgrounds_header" = "Choose Wallpaper";
|
||||||
"lng_theme_sure_keep" = "Keep this theme?";
|
"lng_theme_sure_keep" = "Keep this theme?";
|
||||||
|
|
|
@ -1011,14 +1011,16 @@ void GiftPremiumValidator::showChoosePeerBox(const QString &ref) {
|
||||||
}) | ranges::views::filter([](UserData *u) -> bool {
|
}) | ranges::views::filter([](UserData *u) -> bool {
|
||||||
return u;
|
return u;
|
||||||
}) | ranges::to<std::vector<not_null<UserData*>>>();
|
}) | ranges::to<std::vector<not_null<UserData*>>>();
|
||||||
if (!users.empty()) {
|
if (users.empty()) {
|
||||||
const auto giftBox = show->show(
|
show->showToast(
|
||||||
Box(GiftsBox, _controller, users, api, ref));
|
tr::lng_settings_gift_premium_choose(tr::now));
|
||||||
giftBox->boxClosing(
|
|
||||||
) | rpl::start_with_next([=] {
|
|
||||||
_manyGiftsLifetime.destroy();
|
|
||||||
}, giftBox->lifetime());
|
|
||||||
}
|
}
|
||||||
|
const auto giftBox = show->show(
|
||||||
|
Box(GiftsBox, _controller, users, api, ref));
|
||||||
|
giftBox->boxClosing(
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
_manyGiftsLifetime.destroy();
|
||||||
|
}, giftBox->lifetime());
|
||||||
(*ignoreClose) = true;
|
(*ignoreClose) = true;
|
||||||
peersBox->closeBox();
|
peersBox->closeBox();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue