Add QuickReplyManager::get_quick_reply_unique_id.
This commit is contained in:
parent
f1fbd90ae6
commit
9af1639168
@ -428,11 +428,14 @@ void QuickReplyManager::sort_quick_reply_messages(vector<unique_ptr<QuickReplyMe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuickReplyManager::QuickReplyMessageUniqueId QuickReplyManager::get_quick_reply_unique_id(const QuickReplyMessage *m) {
|
||||||
|
return QuickReplyMessageUniqueId(m->message_id, m->edit_date);
|
||||||
|
}
|
||||||
|
|
||||||
vector<QuickReplyManager::QuickReplyMessageUniqueId> QuickReplyManager::get_quick_reply_unique_ids(
|
vector<QuickReplyManager::QuickReplyMessageUniqueId> QuickReplyManager::get_quick_reply_unique_ids(
|
||||||
const vector<unique_ptr<QuickReplyMessage>> &messages) {
|
const vector<unique_ptr<QuickReplyMessage>> &messages) {
|
||||||
return transform(messages, [](const unique_ptr<QuickReplyMessage> &message) {
|
return transform(
|
||||||
return QuickReplyMessageUniqueId(message->message_id, message->edit_date);
|
messages, [](const unique_ptr<QuickReplyMessage> &message) { return get_quick_reply_unique_id(message.get()); });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<QuickReplyManager::QuickReplyMessageUniqueId> QuickReplyManager::get_server_quick_reply_unique_ids(
|
vector<QuickReplyManager::QuickReplyMessageUniqueId> QuickReplyManager::get_server_quick_reply_unique_ids(
|
||||||
|
@ -145,6 +145,8 @@ class QuickReplyManager final : public Actor {
|
|||||||
|
|
||||||
using QuickReplyMessageUniqueId = std::pair<MessageId, int32>;
|
using QuickReplyMessageUniqueId = std::pair<MessageId, int32>;
|
||||||
|
|
||||||
|
static QuickReplyMessageUniqueId get_quick_reply_unique_id(const QuickReplyMessage *m);
|
||||||
|
|
||||||
static vector<QuickReplyMessageUniqueId> get_quick_reply_unique_ids(
|
static vector<QuickReplyMessageUniqueId> get_quick_reply_unique_ids(
|
||||||
const vector<unique_ptr<QuickReplyMessage>> &messages);
|
const vector<unique_ptr<QuickReplyMessage>> &messages);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user