Periodically reload owned star amount.
This commit is contained in:
parent
1c41488452
commit
86afb5b0f3
@ -845,6 +845,10 @@ void StarManager::reload_star_transaction(DialogId dialog_id, const string &tran
|
|||||||
td_->create_handler<GetStarsTransactionsQuery>(std::move(query_promise))->send(dialog_id, transaction_id, is_refund);
|
td_->create_handler<GetStarsTransactionsQuery>(std::move(query_promise))->send(dialog_id, transaction_id, is_refund);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StarManager::reload_owned_star_count() {
|
||||||
|
do_get_star_transactions(td_->dialog_manager_->get_my_dialog_id(), string(), string(), 1, nullptr, Auto());
|
||||||
|
}
|
||||||
|
|
||||||
void StarManager::on_update_stars_revenue_status(
|
void StarManager::on_update_stars_revenue_status(
|
||||||
telegram_api::object_ptr<telegram_api::updateStarsRevenueStatus> &&update) {
|
telegram_api::object_ptr<telegram_api::updateStarsRevenueStatus> &&update) {
|
||||||
DialogId dialog_id(update->peer_);
|
DialogId dialog_id(update->peer_);
|
||||||
|
@ -60,6 +60,8 @@ class StarManager final : public Actor {
|
|||||||
void reload_star_transaction(DialogId dialog_id, const string &transaction_id, bool is_refund,
|
void reload_star_transaction(DialogId dialog_id, const string &transaction_id, bool is_refund,
|
||||||
Promise<Unit> &&promise);
|
Promise<Unit> &&promise);
|
||||||
|
|
||||||
|
void reload_owned_star_count();
|
||||||
|
|
||||||
void on_update_stars_revenue_status(telegram_api::object_ptr<telegram_api::updateStarsRevenueStatus> &&update);
|
void on_update_stars_revenue_status(telegram_api::object_ptr<telegram_api::updateStarsRevenueStatus> &&update);
|
||||||
|
|
||||||
FileSourceId get_star_transaction_file_source_id(DialogId dialog_id, const string &transaction_id, bool is_refund);
|
FileSourceId get_star_transaction_file_source_id(DialogId dialog_id, const string &transaction_id, bool is_refund);
|
||||||
|
@ -2274,12 +2274,11 @@ void UpdatesManager::try_reload_data() {
|
|||||||
td_->quick_reply_manager_->reload_quick_reply_shortcuts();
|
td_->quick_reply_manager_->reload_quick_reply_shortcuts();
|
||||||
td_->reaction_manager_->reload_reactions();
|
td_->reaction_manager_->reload_reactions();
|
||||||
td_->reaction_manager_->reload_message_effects();
|
td_->reaction_manager_->reload_message_effects();
|
||||||
|
|
||||||
for (int32 type = 0; type < MAX_REACTION_LIST_TYPE; type++) {
|
for (int32 type = 0; type < MAX_REACTION_LIST_TYPE; type++) {
|
||||||
auto reaction_list_type = static_cast<ReactionListType>(type);
|
auto reaction_list_type = static_cast<ReactionListType>(type);
|
||||||
td_->reaction_manager_->reload_reaction_list(reaction_list_type, "try_reload_data");
|
td_->reaction_manager_->reload_reaction_list(reaction_list_type, "try_reload_data");
|
||||||
}
|
}
|
||||||
|
td_->star_manager_->reload_owned_star_count();
|
||||||
for (int32 type = 0; type < MAX_STICKER_TYPE; type++) {
|
for (int32 type = 0; type < MAX_STICKER_TYPE; type++) {
|
||||||
auto sticker_type = static_cast<StickerType>(type);
|
auto sticker_type = static_cast<StickerType>(type);
|
||||||
td_->stickers_manager_->get_installed_sticker_sets(sticker_type, Auto());
|
td_->stickers_manager_->get_installed_sticker_sets(sticker_type, Auto());
|
||||||
|
Loading…
Reference in New Issue
Block a user