Upgrade gift while staying in the same box.
This commit is contained in:
@@ -1205,7 +1205,7 @@ void AddStarGiftTable(
|
||||
Settings::CreditsEntryBoxStyleOverrides st,
|
||||
const Data::CreditsHistoryEntry &entry,
|
||||
Fn<void()> convertToStars,
|
||||
Fn<void()> startUpgrade,
|
||||
bool canStartUpgrade,
|
||||
Fn<void(Fn<void()> removed)> removeDetails) {
|
||||
const auto table = container->add(
|
||||
object_ptr<Ui::TableLayout>(
|
||||
@@ -1426,7 +1426,7 @@ void AddStarGiftTable(
|
||||
std::move(amount),
|
||||
Ui::Text::WithEntities)));
|
||||
}
|
||||
if (!unique && !entry.soldOutInfo && startUpgrade) {
|
||||
if (!unique && !entry.soldOutInfo && canStartUpgrade) {
|
||||
AddTableRow(
|
||||
table,
|
||||
tr::lng_gift_unique_status(),
|
||||
|
||||
@@ -78,7 +78,7 @@ void AddStarGiftTable(
|
||||
Settings::CreditsEntryBoxStyleOverrides st,
|
||||
const Data::CreditsHistoryEntry &entry,
|
||||
Fn<void()> convertToStars,
|
||||
Fn<void()> startUpgrade,
|
||||
bool canStartUpgrade,
|
||||
Fn<void(Fn<void()> removed)> removeDetails);
|
||||
void AddTransferGiftTable(
|
||||
std::shared_ptr<ChatHelpers::Show> show,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -119,8 +119,9 @@ void GiftReleasedByHandler(not_null<PeerData*> peer);
|
||||
|
||||
struct StarGiftUpgradeArgs {
|
||||
not_null<Window::SessionController*> controller;
|
||||
base::required<uint64> stargiftId;
|
||||
Data::StarGift stargift;
|
||||
Fn<void(bool)> ready;
|
||||
Fn<void()> upgraded;
|
||||
not_null<PeerData*> peer;
|
||||
Data::SavedStarGiftId savedId;
|
||||
QString giftPrepayUpgradeHash;
|
||||
|
||||
Reference in New Issue
Block a user