Allow buy-and-set color from collectible.

This commit is contained in:
John Preston
2025-09-26 22:17:08 +04:00
parent 404d8da1a3
commit acafa2bcad
10 changed files with 130 additions and 51 deletions
@@ -790,7 +790,7 @@ void ShowBuyResaleGiftBox(
std::shared_ptr<Data::UniqueGift> gift,
bool forceTon,
not_null<PeerData*> to,
Fn<void()> closeParentBox) {
Fn<void(bool ok)> closeParentBox) {
show->show(Box([=](not_null<Ui::GenericBox*> box) {
struct State {
rpl::variable<bool> ton;
@@ -856,12 +856,12 @@ void ShowBuyResaleGiftBox(
const auto weak = base::make_weak(box);
const auto done = [=](Payments::CheckoutResult result) {
if (result == Payments::CheckoutResult::Cancelled) {
closeParentBox();
closeParentBox(false);
close();
} else if (result != Payments::CheckoutResult::Paid) {
state->sent = false;
} else {
closeParentBox();
closeParentBox(true);
close();
}
};