2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Update API scheme on layer 206.

This commit is contained in:
John Preston
2025-06-23 18:10:07 +04:00
parent dc19f2e76c
commit 0fa50f1951
57 changed files with 556 additions and 348 deletions

View File

@@ -2245,7 +2245,7 @@ void MessageReactions::scheduleSendPaid(
_paid->scheduledPrivacySet = true;
}
if (count > 0) {
_item->history()->session().credits().lock(StarsAmount(count));
_item->history()->session().credits().lock(CreditsAmount(count));
}
_item->history()->owner().reactions().schedulePaid(_item);
}
@@ -2259,7 +2259,7 @@ void MessageReactions::cancelScheduledPaid() {
if (_paid->scheduledFlag) {
if (const auto amount = int(_paid->scheduled)) {
_item->history()->session().credits().unlock(
StarsAmount(amount));
CreditsAmount(amount));
}
_paid->scheduled = 0;
_paid->scheduledFlag = 0;
@@ -2322,9 +2322,9 @@ void MessageReactions::finishPaidSending(
if (const auto amount = send.count) {
const auto credits = &_item->history()->session().credits();
if (success) {
credits->withdrawLocked(StarsAmount(amount));
credits->withdrawLocked(CreditsAmount(amount));
} else {
credits->unlock(StarsAmount(amount));
credits->unlock(CreditsAmount(amount));
}
}
}