Add class StickerListType.
This commit is contained in:
parent
df1e95a57d
commit
74396f65a1
|
@ -472,6 +472,7 @@ set(TDLIB_SOURCE
|
|||
td/telegram/StateManager.cpp
|
||||
td/telegram/StatisticsManager.cpp
|
||||
td/telegram/StickerFormat.cpp
|
||||
td/telegram/StickerListType.cpp
|
||||
td/telegram/StickerMaskPosition.cpp
|
||||
td/telegram/StickerPhotoSize.cpp
|
||||
td/telegram/StickerSetId.cpp
|
||||
|
@ -783,6 +784,7 @@ set(TDLIB_SOURCE
|
|||
td/telegram/StateManager.h
|
||||
td/telegram/StatisticsManager.h
|
||||
td/telegram/StickerFormat.h
|
||||
td/telegram/StickerListType.h
|
||||
td/telegram/StickerMaskPosition.h
|
||||
td/telegram/StickerPhotoSize.h
|
||||
td/telegram/StickerSetId.h
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#include "td/telegram/StickerListType.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
string get_sticker_list_type_database_key(StickerListType sticker_list_type) {
|
||||
switch (sticker_list_type) {
|
||||
case StickerListType::DialogPhoto:
|
||||
return "default_dialog_photo_custom_emoji_ids";
|
||||
case StickerListType::UserProfilePhoto:
|
||||
return "default_profile_photo_custom_emoji_ids";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string();
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, StickerListType sticker_list_type) {
|
||||
switch (sticker_list_type) {
|
||||
case StickerListType::DialogPhoto:
|
||||
return string_builder << "default chat photo custom emoji identifiers";
|
||||
case StickerListType::UserProfilePhoto:
|
||||
return string_builder << "default user profile photo custom emoji identifiers";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string_builder;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace td
|
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include "td/utils/common.h"
|
||||
#include "td/utils/StringBuilder.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
enum class StickerListType : int32 { DialogPhoto, UserProfilePhoto };
|
||||
|
||||
static constexpr int32 MAX_STICKER_LIST_TYPE = 2;
|
||||
|
||||
string get_sticker_list_type_database_key(StickerListType sticker_list_type);
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, StickerListType sticker_list_type);
|
||||
|
||||
} // namespace td
|
|
@ -1446,11 +1446,17 @@ class GetDefaultDialogPhotoEmojisQuery final : public Td::ResultHandler {
|
|||
: promise_(std::move(promise)) {
|
||||
}
|
||||
|
||||
void send(bool for_user, int64 hash) {
|
||||
if (for_user) {
|
||||
send_query(G()->net_query_creator().create(telegram_api::account_getDefaultProfilePhotoEmojis(hash)));
|
||||
} else {
|
||||
send_query(G()->net_query_creator().create(telegram_api::account_getDefaultGroupPhotoEmojis(hash)));
|
||||
void send(StickerListType sticker_list_type, int64 hash) {
|
||||
switch (sticker_list_type) {
|
||||
case StickerListType::DialogPhoto:
|
||||
send_query(G()->net_query_creator().create(telegram_api::account_getDefaultGroupPhotoEmojis(hash)));
|
||||
break;
|
||||
case StickerListType::UserProfilePhoto:
|
||||
send_query(G()->net_query_creator().create(telegram_api::account_getDefaultProfilePhotoEmojis(hash)));
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6223,36 +6229,31 @@ void StickersManager::on_get_custom_emoji_documents(
|
|||
promise.set_value(get_custom_emoji_stickers_object(custom_emoji_ids));
|
||||
}
|
||||
|
||||
string StickersManager::get_default_dialog_photo_custom_emoji_ids_database_key(bool for_user) {
|
||||
return for_user ? "default_profile_photo_custom_emoji_ids" : "default_dialog_photo_custom_emoji_ids";
|
||||
}
|
||||
|
||||
void StickersManager::get_default_dialog_photo_custom_emoji_stickers(
|
||||
bool for_user, bool force_reload, Promise<td_api::object_ptr<td_api::stickers>> &&promise) {
|
||||
if (are_default_dialog_photo_custom_emoji_ids_loaded_[for_user] && !force_reload) {
|
||||
return get_custom_emoji_stickers_unlimited(default_dialog_photo_custom_emoji_ids_[for_user], std::move(promise));
|
||||
void StickersManager::get_default_custom_emoji_stickers(StickerListType sticker_list_type, bool force_reload,
|
||||
Promise<td_api::object_ptr<td_api::stickers>> &&promise) {
|
||||
auto index = static_cast<int32>(sticker_list_type);
|
||||
if (are_default_custom_emoji_ids_loaded_[index] && !force_reload) {
|
||||
return get_custom_emoji_stickers_unlimited(default_custom_emoji_ids_[index], std::move(promise));
|
||||
}
|
||||
|
||||
auto &queries = default_dialog_photo_custom_emoji_ids_load_queries_[for_user];
|
||||
auto &queries = default_custom_emoji_ids_load_queries_[index];
|
||||
queries.push_back(std::move(promise));
|
||||
if (queries.size() != 1) {
|
||||
// query has already been sent, just wait for the result
|
||||
return;
|
||||
}
|
||||
|
||||
if (G()->use_sqlite_pmc() && !are_default_dialog_photo_custom_emoji_ids_loaded_[for_user]) {
|
||||
LOG(INFO) << "Trying to load " << (for_user ? "profile" : "chat")
|
||||
<< " photo custom emoji identifiers from database";
|
||||
if (G()->use_sqlite_pmc() && !are_default_custom_emoji_ids_loaded_[index]) {
|
||||
LOG(INFO) << "Trying to load " << sticker_list_type << " from database";
|
||||
return G()->td_db()->get_sqlite_pmc()->get(
|
||||
get_default_dialog_photo_custom_emoji_ids_database_key(for_user),
|
||||
PromiseCreator::lambda([for_user, force_reload](string value) {
|
||||
send_closure(G()->stickers_manager(),
|
||||
&StickersManager::on_load_default_dialog_photo_custom_emoji_ids_from_database, for_user,
|
||||
force_reload, std::move(value));
|
||||
get_sticker_list_type_database_key(sticker_list_type),
|
||||
PromiseCreator::lambda([sticker_list_type, force_reload](string value) {
|
||||
send_closure(G()->stickers_manager(), &StickersManager::on_load_default_custom_emoji_ids_from_database,
|
||||
sticker_list_type, force_reload, std::move(value));
|
||||
}));
|
||||
}
|
||||
|
||||
reload_default_dialog_photo_custom_emoji_ids(for_user);
|
||||
reload_default_custom_emoji_ids(sticker_list_type);
|
||||
}
|
||||
|
||||
class StickersManager::CustomEmojiIdsLogEvent {
|
||||
|
@ -6279,76 +6280,77 @@ class StickersManager::CustomEmojiIdsLogEvent {
|
|||
}
|
||||
};
|
||||
|
||||
void StickersManager::on_load_default_dialog_photo_custom_emoji_ids_from_database(bool for_user, bool force_reload,
|
||||
string value) {
|
||||
void StickersManager::on_load_default_custom_emoji_ids_from_database(StickerListType sticker_list_type,
|
||||
bool force_reload, string value) {
|
||||
if (G()->close_flag()) {
|
||||
fail_promises(default_dialog_photo_custom_emoji_ids_load_queries_[for_user], Global::request_aborted_error());
|
||||
auto index = static_cast<int32>(sticker_list_type);
|
||||
fail_promises(default_custom_emoji_ids_load_queries_[index], Global::request_aborted_error());
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.empty()) {
|
||||
return reload_default_dialog_photo_custom_emoji_ids(for_user);
|
||||
return reload_default_custom_emoji_ids(sticker_list_type);
|
||||
}
|
||||
|
||||
LOG(INFO) << "Successfully loaded default " << (for_user ? "profile" : "chat")
|
||||
<< " photo custom emoji identifiers of size " << value.size() << " from database";
|
||||
LOG(INFO) << "Successfully loaded " << sticker_list_type << " of size " << value.size() << " from database";
|
||||
CustomEmojiIdsLogEvent log_event;
|
||||
if (log_event_parse(log_event, value).is_error()) {
|
||||
LOG(ERROR) << "Delete invalid default " << (for_user ? "profile" : "chat")
|
||||
<< " photo custom emoji identifiers from database";
|
||||
G()->td_db()->get_sqlite_pmc()->erase(get_default_dialog_photo_custom_emoji_ids_database_key(for_user), Auto());
|
||||
return reload_default_dialog_photo_custom_emoji_ids(for_user);
|
||||
LOG(ERROR) << "Delete invalid " << sticker_list_type << " from database";
|
||||
G()->td_db()->get_sqlite_pmc()->erase(get_sticker_list_type_database_key(sticker_list_type), Auto());
|
||||
return reload_default_custom_emoji_ids(sticker_list_type);
|
||||
}
|
||||
|
||||
on_get_default_dialog_photo_custom_emoji_ids_success(for_user, std::move(log_event.custom_emoji_ids_),
|
||||
log_event.hash_);
|
||||
on_get_default_custom_emoji_ids_success(sticker_list_type, std::move(log_event.custom_emoji_ids_), log_event.hash_);
|
||||
if (force_reload) {
|
||||
reload_default_dialog_photo_custom_emoji_ids(for_user);
|
||||
reload_default_custom_emoji_ids(sticker_list_type);
|
||||
}
|
||||
}
|
||||
|
||||
void StickersManager::reload_default_dialog_photo_custom_emoji_ids(bool for_user) {
|
||||
void StickersManager::reload_default_custom_emoji_ids(StickerListType sticker_list_type) {
|
||||
if (G()->close_flag()) {
|
||||
fail_promises(default_dialog_photo_custom_emoji_ids_load_queries_[for_user], Global::request_aborted_error());
|
||||
auto index = static_cast<int32>(sticker_list_type);
|
||||
fail_promises(default_custom_emoji_ids_load_queries_[index], Global::request_aborted_error());
|
||||
return;
|
||||
}
|
||||
CHECK(!td_->auth_manager_->is_bot());
|
||||
if (are_default_dialog_photo_custom_emoji_ids_being_loaded_[for_user]) {
|
||||
auto index = static_cast<int32>(sticker_list_type);
|
||||
if (are_default_custom_emoji_ids_being_loaded_[index]) {
|
||||
return;
|
||||
}
|
||||
are_default_dialog_photo_custom_emoji_ids_being_loaded_[for_user] = true;
|
||||
are_default_custom_emoji_ids_being_loaded_[index] = true;
|
||||
|
||||
auto query_promise =
|
||||
PromiseCreator::lambda([actor_id = actor_id(this), for_user](
|
||||
PromiseCreator::lambda([actor_id = actor_id(this), sticker_list_type](
|
||||
Result<telegram_api::object_ptr<telegram_api::EmojiList>> r_emoji_list) mutable {
|
||||
send_closure(actor_id, &StickersManager::on_get_default_dialog_photo_custom_emoji_ids, for_user,
|
||||
send_closure(actor_id, &StickersManager::on_get_default_custom_emoji_ids, sticker_list_type,
|
||||
std::move(r_emoji_list));
|
||||
});
|
||||
td_->create_handler<GetDefaultDialogPhotoEmojisQuery>(std::move(query_promise))
|
||||
->send(for_user, default_dialog_photo_custom_emoji_ids_hash_[for_user]);
|
||||
->send(sticker_list_type, default_custom_emoji_ids_hash_[index]);
|
||||
}
|
||||
|
||||
void StickersManager::on_get_default_dialog_photo_custom_emoji_ids(
|
||||
bool for_user, Result<telegram_api::object_ptr<telegram_api::EmojiList>> r_emoji_list) {
|
||||
void StickersManager::on_get_default_custom_emoji_ids(
|
||||
StickerListType sticker_list_type, Result<telegram_api::object_ptr<telegram_api::EmojiList>> r_emoji_list) {
|
||||
G()->ignore_result_if_closing(r_emoji_list);
|
||||
|
||||
CHECK(are_default_dialog_photo_custom_emoji_ids_being_loaded_[for_user]);
|
||||
are_default_dialog_photo_custom_emoji_ids_being_loaded_[for_user] = false;
|
||||
auto index = static_cast<int32>(sticker_list_type);
|
||||
CHECK(are_default_custom_emoji_ids_being_loaded_[index]);
|
||||
are_default_custom_emoji_ids_being_loaded_[index] = false;
|
||||
|
||||
if (r_emoji_list.is_error()) {
|
||||
fail_promises(default_dialog_photo_custom_emoji_ids_load_queries_[for_user], r_emoji_list.move_as_error());
|
||||
fail_promises(default_custom_emoji_ids_load_queries_[index], r_emoji_list.move_as_error());
|
||||
return;
|
||||
}
|
||||
|
||||
auto emoji_list_ptr = r_emoji_list.move_as_ok();
|
||||
int32 constructor_id = emoji_list_ptr->get_id();
|
||||
if (constructor_id == telegram_api::emojiListNotModified::ID) {
|
||||
LOG(INFO) << "Default " << (for_user ? "profile" : "chat") << " photo custom emoji identifiers aren't modified";
|
||||
if (!are_default_dialog_photo_custom_emoji_ids_loaded_[for_user]) {
|
||||
on_get_default_dialog_photo_custom_emoji_ids_success(for_user, {}, 0);
|
||||
LOG(INFO) << "The " << sticker_list_type << " isn't modified";
|
||||
if (!are_default_custom_emoji_ids_loaded_[index]) {
|
||||
on_get_default_custom_emoji_ids_success(sticker_list_type, {}, 0);
|
||||
}
|
||||
auto promises = std::move(default_dialog_photo_custom_emoji_ids_load_queries_[for_user]);
|
||||
reset_to_empty(default_dialog_photo_custom_emoji_ids_load_queries_[for_user]);
|
||||
auto promises = std::move(default_custom_emoji_ids_load_queries_[index]);
|
||||
reset_to_empty(default_custom_emoji_ids_load_queries_[index]);
|
||||
for (auto &promise : promises) {
|
||||
CHECK(!promise);
|
||||
}
|
||||
|
@ -6361,26 +6363,25 @@ void StickersManager::on_get_default_dialog_photo_custom_emoji_ids(
|
|||
|
||||
if (G()->use_sqlite_pmc()) {
|
||||
CustomEmojiIdsLogEvent log_event(custom_emoji_ids, hash);
|
||||
G()->td_db()->get_sqlite_pmc()->set(get_default_dialog_photo_custom_emoji_ids_database_key(for_user),
|
||||
G()->td_db()->get_sqlite_pmc()->set(get_sticker_list_type_database_key(sticker_list_type),
|
||||
log_event_store(log_event).as_slice().str(), Auto());
|
||||
}
|
||||
|
||||
on_get_default_dialog_photo_custom_emoji_ids_success(for_user, std::move(custom_emoji_ids), hash);
|
||||
on_get_default_custom_emoji_ids_success(sticker_list_type, std::move(custom_emoji_ids), hash);
|
||||
}
|
||||
|
||||
void StickersManager::on_get_default_dialog_photo_custom_emoji_ids_success(bool for_user,
|
||||
vector<CustomEmojiId> custom_emoji_ids,
|
||||
int64 hash) {
|
||||
LOG(INFO) << "Load " << custom_emoji_ids.size() << " default " << (for_user ? "profile" : "chat")
|
||||
<< " photo custom emoji identifiers";
|
||||
default_dialog_photo_custom_emoji_ids_[for_user] = std::move(custom_emoji_ids);
|
||||
default_dialog_photo_custom_emoji_ids_hash_[for_user] = hash;
|
||||
are_default_dialog_photo_custom_emoji_ids_loaded_[for_user] = true;
|
||||
void StickersManager::on_get_default_custom_emoji_ids_success(StickerListType sticker_list_type,
|
||||
vector<CustomEmojiId> custom_emoji_ids, int64 hash) {
|
||||
auto index = static_cast<int32>(sticker_list_type);
|
||||
LOG(INFO) << "Load " << custom_emoji_ids.size() << ' ' << sticker_list_type;
|
||||
default_custom_emoji_ids_[index] = std::move(custom_emoji_ids);
|
||||
default_custom_emoji_ids_hash_[index] = hash;
|
||||
are_default_custom_emoji_ids_loaded_[index] = true;
|
||||
|
||||
auto promises = std::move(default_dialog_photo_custom_emoji_ids_load_queries_[for_user]);
|
||||
reset_to_empty(default_dialog_photo_custom_emoji_ids_load_queries_[for_user]);
|
||||
auto promises = std::move(default_custom_emoji_ids_load_queries_[index]);
|
||||
reset_to_empty(default_custom_emoji_ids_load_queries_[index]);
|
||||
for (auto &promise : promises) {
|
||||
get_custom_emoji_stickers_unlimited(default_dialog_photo_custom_emoji_ids_[for_user], std::move(promise));
|
||||
get_custom_emoji_stickers_unlimited(default_custom_emoji_ids_[index], std::move(promise));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "td/telegram/SecretInputMedia.h"
|
||||
#include "td/telegram/SpecialStickerSetType.h"
|
||||
#include "td/telegram/StickerFormat.h"
|
||||
#include "td/telegram/StickerListType.h"
|
||||
#include "td/telegram/StickerMaskPosition.h"
|
||||
#include "td/telegram/StickerSetId.h"
|
||||
#include "td/telegram/StickerType.h"
|
||||
|
@ -134,8 +135,8 @@ class StickersManager final : public Actor {
|
|||
void get_custom_emoji_stickers(vector<CustomEmojiId> custom_emoji_ids, bool use_database,
|
||||
Promise<td_api::object_ptr<td_api::stickers>> &&promise);
|
||||
|
||||
void get_default_dialog_photo_custom_emoji_stickers(bool for_user, bool force_reload,
|
||||
Promise<td_api::object_ptr<td_api::stickers>> &&promise);
|
||||
void get_default_custom_emoji_stickers(StickerListType sticker_list_type, bool force_reload,
|
||||
Promise<td_api::object_ptr<td_api::stickers>> &&promise);
|
||||
|
||||
void get_premium_gift_option_sticker(int32 month_count, bool is_recursive,
|
||||
Promise<td_api::object_ptr<td_api::sticker>> &&promise);
|
||||
|
@ -617,15 +618,16 @@ class StickersManager final : public Actor {
|
|||
|
||||
void on_load_custom_emoji_from_database(CustomEmojiId custom_emoji_id, string value);
|
||||
|
||||
void on_load_default_dialog_photo_custom_emoji_ids_from_database(bool for_user, bool force_reload, string value);
|
||||
void on_load_default_custom_emoji_ids_from_database(StickerListType sticker_list_type, bool force_reload,
|
||||
string value);
|
||||
|
||||
void reload_default_dialog_photo_custom_emoji_ids(bool for_user);
|
||||
void reload_default_custom_emoji_ids(StickerListType sticker_list_type);
|
||||
|
||||
void on_get_default_dialog_photo_custom_emoji_ids(
|
||||
bool for_user, Result<telegram_api::object_ptr<telegram_api::EmojiList>> r_emoji_list);
|
||||
void on_get_default_custom_emoji_ids(StickerListType sticker_list_type,
|
||||
Result<telegram_api::object_ptr<telegram_api::EmojiList>> r_emoji_list);
|
||||
|
||||
void on_get_default_dialog_photo_custom_emoji_ids_success(bool for_user, vector<CustomEmojiId> custom_emoji_ids,
|
||||
int64 hash);
|
||||
void on_get_default_custom_emoji_ids_success(StickerListType sticker_list_type,
|
||||
vector<CustomEmojiId> custom_emoji_ids, int64 hash);
|
||||
|
||||
FileId on_get_sticker(unique_ptr<Sticker> new_sticker, bool replace);
|
||||
|
||||
|
@ -908,8 +910,6 @@ class StickersManager final : public Actor {
|
|||
|
||||
static string get_emoji_language_codes_database_key(const vector<string> &language_codes);
|
||||
|
||||
static string get_default_dialog_photo_custom_emoji_ids_database_key(bool for_user);
|
||||
|
||||
static string get_emoji_groups_database_key(EmojiGroupType group_type);
|
||||
|
||||
int32 get_emoji_language_code_version(const string &language_code);
|
||||
|
@ -1122,11 +1122,11 @@ class StickersManager final : public Actor {
|
|||
EmojiGroupList emoji_group_list_[MAX_EMOJI_GROUP_TYPE];
|
||||
vector<Promise<td_api::object_ptr<td_api::emojiCategories>>> emoji_group_load_queries_[MAX_EMOJI_GROUP_TYPE];
|
||||
|
||||
vector<CustomEmojiId> default_dialog_photo_custom_emoji_ids_[2];
|
||||
int64 default_dialog_photo_custom_emoji_ids_hash_[2] = {0, 0};
|
||||
vector<Promise<td_api::object_ptr<td_api::stickers>>> default_dialog_photo_custom_emoji_ids_load_queries_[2];
|
||||
bool are_default_dialog_photo_custom_emoji_ids_loaded_[2] = {false, false};
|
||||
bool are_default_dialog_photo_custom_emoji_ids_being_loaded_[2] = {false, false};
|
||||
vector<CustomEmojiId> default_custom_emoji_ids_[MAX_STICKER_LIST_TYPE];
|
||||
int64 default_custom_emoji_ids_hash_[MAX_STICKER_LIST_TYPE] = {0, 0};
|
||||
vector<Promise<td_api::object_ptr<td_api::stickers>>> default_custom_emoji_ids_load_queries_[MAX_STICKER_LIST_TYPE];
|
||||
bool are_default_custom_emoji_ids_loaded_[MAX_STICKER_LIST_TYPE] = {false, false};
|
||||
bool are_default_custom_emoji_ids_being_loaded_[MAX_STICKER_LIST_TYPE] = {false, false};
|
||||
|
||||
WaitFreeHashMap<CustomEmojiId, FileId, CustomEmojiIdHash> custom_emoji_to_sticker_id_;
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
#include "td/telegram/StateManager.h"
|
||||
#include "td/telegram/StatisticsManager.h"
|
||||
#include "td/telegram/StickerFormat.h"
|
||||
#include "td/telegram/StickerListType.h"
|
||||
#include "td/telegram/StickerSetId.h"
|
||||
#include "td/telegram/StickersManager.h"
|
||||
#include "td/telegram/StickerType.h"
|
||||
|
@ -7977,13 +7978,13 @@ void Td::on_request(uint64 id, const td_api::getCustomEmojiStickers &request) {
|
|||
void Td::on_request(uint64 id, const td_api::getDefaultChatPhotoCustomEmojiStickers &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_REQUEST_PROMISE();
|
||||
stickers_manager_->get_default_dialog_photo_custom_emoji_stickers(false, false, std::move(promise));
|
||||
stickers_manager_->get_default_custom_emoji_stickers(StickerListType::DialogPhoto, false, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::getDefaultProfilePhotoCustomEmojiStickers &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_REQUEST_PROMISE();
|
||||
stickers_manager_->get_default_dialog_photo_custom_emoji_stickers(true, false, std::move(promise));
|
||||
stickers_manager_->get_default_custom_emoji_stickers(StickerListType::UserProfilePhoto, false, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::getSavedAnimations &request) {
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "td/telegram/ServerMessageId.h"
|
||||
#include "td/telegram/SpecialStickerSetType.h"
|
||||
#include "td/telegram/StateManager.h"
|
||||
#include "td/telegram/StickerListType.h"
|
||||
#include "td/telegram/StickerSetId.h"
|
||||
#include "td/telegram/StickersManager.h"
|
||||
#include "td/telegram/StickerType.h"
|
||||
|
@ -2265,8 +2266,8 @@ void UpdatesManager::try_reload_data() {
|
|||
td_->stickers_manager_->reload_special_sticker_set_by_type(SpecialStickerSetType::generic_animations());
|
||||
td_->stickers_manager_->reload_special_sticker_set_by_type(SpecialStickerSetType::default_statuses());
|
||||
td_->stickers_manager_->reload_special_sticker_set_by_type(SpecialStickerSetType::default_topic_icons());
|
||||
td_->stickers_manager_->get_default_dialog_photo_custom_emoji_stickers(false, true, Auto());
|
||||
td_->stickers_manager_->get_default_dialog_photo_custom_emoji_stickers(true, true, Auto());
|
||||
td_->stickers_manager_->get_default_custom_emoji_stickers(StickerListType::DialogPhoto, true, Auto());
|
||||
td_->stickers_manager_->get_default_custom_emoji_stickers(StickerListType::UserProfilePhoto, true, Auto());
|
||||
td_->story_manager_->reload_active_stories();
|
||||
td_->story_manager_->reload_all_read_stories();
|
||||
|
||||
|
|
Loading…
Reference in New Issue