Improve emoji category type name and documentation.
This commit is contained in:
parent
3df2fbc072
commit
5a7970fe79
@ -3701,7 +3701,9 @@ trendingStickerSets total_count:int32 sets:vector<stickerSetInfo> is_premium:Boo
|
||||
|
||||
//@class EmojiCategorySource @description Describes source of stickers for an emoji category
|
||||
|
||||
//@description The category contains a list of similar emoji to search for in getStickers and searchStickers @emojis List of emojis for search for
|
||||
//@description The category contains a list of similar emoji to search for in getStickers and searchStickers for stickers,
|
||||
//-or getInlineQueryResults with the bot getOption("animation_search_bot_username") for animations
|
||||
//@emojis List of emojis for search for
|
||||
emojiCategorySourceSearch emojis:vector<string> = EmojiCategorySource;
|
||||
|
||||
//@description The category contains Premium stickers that must be found by getPremiumStickers
|
||||
@ -3721,18 +3723,18 @@ emojiCategories categories:vector<emojiCategory> = EmojiCategories;
|
||||
|
||||
//@class EmojiCategoryType @description Describes type of emoji category
|
||||
|
||||
//@description The category must be used by default
|
||||
//@description The category must be used by default (e.g., for custom emoji or animation search)
|
||||
emojiCategoryTypeDefault = EmojiCategoryType;
|
||||
|
||||
//@description The category must be used by default for regular sticker selection. It may contain greeting emoji category and Premium stickers
|
||||
emojiCategoryTypeRegularStickers = EmojiCategoryType;
|
||||
|
||||
//@description The category must be used for emoji status selection
|
||||
emojiCategoryTypeEmojiStatus = EmojiCategoryType;
|
||||
|
||||
//@description The category must be used for chat photo emoji selection
|
||||
emojiCategoryTypeChatPhoto = EmojiCategoryType;
|
||||
|
||||
//@description The category containing greeting emoji and Premium stickers that must be used for start page sticker selection
|
||||
emojiCategoryTypeCombined = EmojiCategoryType;
|
||||
|
||||
|
||||
//@description Describes position of a clickable rectangle area on a story media
|
||||
//@x_percentage The abscissa of the rectangle's center, as a percentage of the media width
|
||||
|
@ -19,8 +19,8 @@ EmojiGroupType get_emoji_group_type(const td_api::object_ptr<td_api::EmojiCatego
|
||||
return EmojiGroupType::EmojiStatus;
|
||||
case td_api::emojiCategoryTypeChatPhoto::ID:
|
||||
return EmojiGroupType::ProfilePhoto;
|
||||
case td_api::emojiCategoryTypeCombined::ID:
|
||||
return EmojiGroupType::Combined;
|
||||
case td_api::emojiCategoryTypeRegularStickers::ID:
|
||||
return EmojiGroupType::RegularStickers;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return EmojiGroupType::Default;
|
||||
@ -35,8 +35,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, EmojiGroupType emoji_gr
|
||||
return string_builder << "EmojiStatus";
|
||||
case EmojiGroupType::ProfilePhoto:
|
||||
return string_builder << "ChatPhoto";
|
||||
case EmojiGroupType::Combined:
|
||||
return string_builder << "Combined";
|
||||
case EmojiGroupType::RegularStickers:
|
||||
return string_builder << "RegularStickers";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string_builder;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
enum class EmojiGroupType : int32 { Default, EmojiStatus, ProfilePhoto, Combined };
|
||||
enum class EmojiGroupType : int32 { Default, EmojiStatus, ProfilePhoto, RegularStickers };
|
||||
|
||||
static constexpr int32 MAX_EMOJI_GROUP_TYPE = 4;
|
||||
|
||||
|
@ -1463,7 +1463,7 @@ class GetEmojiGroupsQuery final : public Td::ResultHandler {
|
||||
case EmojiGroupType::ProfilePhoto:
|
||||
send_query(G()->net_query_creator().create(telegram_api::messages_getEmojiProfilePhotoGroups(hash)));
|
||||
break;
|
||||
case EmojiGroupType::Combined:
|
||||
case EmojiGroupType::RegularStickers:
|
||||
send_query(G()->net_query_creator().create(telegram_api::messages_getEmojiStickerGroups(hash)));
|
||||
break;
|
||||
default:
|
||||
|
@ -3632,7 +3632,7 @@ class CliClient final : public Actor {
|
||||
send_request(td_api::make_object<td_api::getKeywordEmojis>(args, vector<string>()));
|
||||
} else if (op == "gkeru") {
|
||||
send_request(td_api::make_object<td_api::getKeywordEmojis>(args, vector<string>{"ru_RU"}));
|
||||
} else if (op == "gec" || op == "geces" || op == "geccp" || op == "gecc") {
|
||||
} else if (op == "gec" || op == "geces" || op == "geccp" || op == "gecrs") {
|
||||
auto type = [&]() -> td_api::object_ptr<td_api::EmojiCategoryType> {
|
||||
if (op == "geces") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeEmojiStatus>();
|
||||
@ -3640,8 +3640,8 @@ class CliClient final : public Actor {
|
||||
if (op == "geccp") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeChatPhoto>();
|
||||
}
|
||||
if (op == "gecc") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeCombined>();
|
||||
if (op == "gecrs") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeRegularStickers>();
|
||||
}
|
||||
return td_api::make_object<td_api::emojiCategoryTypeDefault>();
|
||||
}();
|
||||
|
Loading…
Reference in New Issue
Block a user