Support improved updateStickerSets.
This commit is contained in:
parent
ce845b0753
commit
663389f19d
@ -5151,13 +5151,11 @@ void StickersManager::on_update_disable_animated_emojis() {
|
||||
}
|
||||
}
|
||||
|
||||
void StickersManager::on_update_sticker_sets() {
|
||||
// TODO better support
|
||||
for (int32 type = 0; type < MAX_STICKER_TYPE; type++) {
|
||||
archived_sticker_set_ids_[type].clear();
|
||||
total_archived_sticker_set_count_[type] = -1;
|
||||
reload_installed_sticker_sets(static_cast<StickerType>(type), true);
|
||||
}
|
||||
void StickersManager::on_update_sticker_sets(StickerType sticker_type) {
|
||||
auto type = static_cast<int32>(sticker_type);
|
||||
archived_sticker_set_ids_[type].clear();
|
||||
total_archived_sticker_set_count_[type] = -1;
|
||||
reload_installed_sticker_sets(sticker_type, true);
|
||||
}
|
||||
|
||||
void StickersManager::try_update_animated_emoji_messages() {
|
||||
|
@ -205,7 +205,7 @@ class StickersManager final : public Actor {
|
||||
|
||||
void on_update_emoji_sounds();
|
||||
|
||||
void on_update_sticker_sets();
|
||||
void on_update_sticker_sets(StickerType sticker_type);
|
||||
|
||||
void on_update_sticker_sets_order(StickerType sticker_type, const vector<StickerSetId> &sticker_set_ids);
|
||||
|
||||
|
@ -3356,7 +3356,13 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateNewStickerSet>
|
||||
}
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateStickerSets> update, Promise<Unit> &&promise) {
|
||||
td_->stickers_manager_->on_update_sticker_sets();
|
||||
StickerType sticker_type = StickerType::Regular;
|
||||
if (update->emojis_) {
|
||||
sticker_type = StickerType::CustomEmoji;
|
||||
} else if (update->masks_) {
|
||||
sticker_type = StickerType::Mask;
|
||||
}
|
||||
td_->stickers_manager_->on_update_sticker_sets(sticker_type);
|
||||
promise.set_value(Unit());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user