Skip to content

Commit

Permalink
Clear flags immediately instead of at the scope exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Dec 5, 2024
1 parent aedce2c commit d0f077f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions td/telegram/StarManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,11 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
transaction->transaction_url_);
}
if (transaction->pending_) {
SCOPE_EXIT {
transaction->pending_ = false;
};
transaction->pending_ = false;
return td_api::make_object<td_api::revenueWithdrawalStatePending>();
}
if (transaction->failed_) {
SCOPE_EXIT {
transaction->failed_ = false;
};
transaction->failed_ = false;
return td_api::make_object<td_api::revenueWithdrawalStateFailed>();
}
return nullptr;
Expand Down Expand Up @@ -444,9 +440,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
}
if (transaction->reaction_) {
if (for_channel) {
SCOPE_EXIT {
transaction->reaction_ = false;
};
transaction->reaction_ = false;
return td_api::make_object<td_api::starTransactionTypeChannelPaidReactionReceive>(
user_id_object, get_message_id_object());
}
Expand Down

0 comments on commit d0f077f

Please sign in to comment.