mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Update API scheme on layer 152.
Add a method for ProfilePhoto emoji group requesting.
This commit is contained in:
parent
a50cde291b
commit
02a0ca7112
3 changed files with 17 additions and 0 deletions
|
@ -1837,6 +1837,7 @@ messages.getDefaultHistoryTTL#658b7188 = DefaultHistoryTTL;
|
|||
messages.sendBotRequestedPeer#fe38d01b peer:InputPeer msg_id:int button_id:int requested_peer:InputPeer = Updates;
|
||||
messages.getEmojiGroups#7488ce5b hash:int = messages.EmojiGroups;
|
||||
messages.getEmojiStatusGroups#2ecd56cd hash:int = messages.EmojiGroups;
|
||||
messages.getEmojiProfilePhotoGroups#21a548f3 hash:int = messages.EmojiGroups;
|
||||
messages.searchCustomEmoji#2c11c0d7 emoticon:string hash:long = EmojiList;
|
||||
messages.togglePeerTranslations#e47cb579 flags:# disabled:flags.0?true peer:InputPeer = Bool;
|
||||
|
||||
|
|
|
@ -137,6 +137,12 @@ auto EmojiStatuses::statusGroupsValue() const -> rpl::producer<Groups> {
|
|||
return _statusGroups.data.value();
|
||||
}
|
||||
|
||||
auto EmojiStatuses::profilePhotoGroupsValue() const
|
||||
-> rpl::producer<Groups> {
|
||||
const_cast<EmojiStatuses*>(this)->requestProfilePhotoGroups();
|
||||
return _profilePhotoGroups.data.value();
|
||||
}
|
||||
|
||||
void EmojiStatuses::requestEmojiGroups() {
|
||||
requestGroups(
|
||||
&_emojiGroups,
|
||||
|
@ -150,6 +156,13 @@ void EmojiStatuses::requestStatusGroups() {
|
|||
MTPmessages_GetEmojiStatusGroups(MTP_int(_statusGroups.hash)));
|
||||
}
|
||||
|
||||
void EmojiStatuses::requestProfilePhotoGroups() {
|
||||
requestGroups(
|
||||
&_profilePhotoGroups,
|
||||
MTPmessages_GetEmojiProfilePhotoGroups(
|
||||
MTP_int(_profilePhotoGroups.hash)));
|
||||
}
|
||||
|
||||
[[nodiscard]] std::vector<Ui::EmojiGroup> GroupsFromTL(
|
||||
const MTPDmessages_emojiGroups &data) {
|
||||
const auto &list = data.vgroups().v;
|
||||
|
|
|
@ -56,8 +56,10 @@ public:
|
|||
using Groups = std::vector<Ui::EmojiGroup>;
|
||||
[[nodiscard]] rpl::producer<Groups> emojiGroupsValue() const;
|
||||
[[nodiscard]] rpl::producer<Groups> statusGroupsValue() const;
|
||||
[[nodiscard]] rpl::producer<Groups> profilePhotoGroupsValue() const;
|
||||
void requestEmojiGroups();
|
||||
void requestStatusGroups();
|
||||
void requestProfilePhotoGroups();
|
||||
|
||||
private:
|
||||
struct GroupsType {
|
||||
|
@ -105,6 +107,7 @@ private:
|
|||
|
||||
GroupsType _emojiGroups;
|
||||
GroupsType _statusGroups;
|
||||
GroupsType _profilePhotoGroups;
|
||||
|
||||
rpl::lifetime _lifetime;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue