mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Added ScheduledMessages::lookupItem for FullMsgId.
This commit is contained in:
parent
c350e33dd8
commit
31fa2d9355
2 changed files with 5 additions and 0 deletions
|
@ -133,6 +133,10 @@ HistoryItem *ScheduledMessages::lookupItem(PeerId peer, MsgId msg) const {
|
||||||
return (*j).get();
|
return (*j).get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HistoryItem *ScheduledMessages::lookupItem(FullMsgId itemId) const {
|
||||||
|
return lookupItem(peerFromChannel(itemId.channel), itemId.msg);
|
||||||
|
}
|
||||||
|
|
||||||
int ScheduledMessages::count(not_null<History*> history) const {
|
int ScheduledMessages::count(not_null<History*> history) const {
|
||||||
const auto i = _data.find(history);
|
const auto i = _data.find(history);
|
||||||
return (i != end(_data)) ? i->second.items.size() : 0;
|
return (i != end(_data)) ? i->second.items.size() : 0;
|
||||||
|
|
|
@ -30,6 +30,7 @@ public:
|
||||||
|
|
||||||
[[nodiscard]] MsgId lookupId(not_null<HistoryItem*> item) const;
|
[[nodiscard]] MsgId lookupId(not_null<HistoryItem*> item) const;
|
||||||
[[nodiscard]] HistoryItem *lookupItem(PeerId peer, MsgId msg) const;
|
[[nodiscard]] HistoryItem *lookupItem(PeerId peer, MsgId msg) const;
|
||||||
|
[[nodiscard]] HistoryItem *lookupItem(FullMsgId itemId) const;
|
||||||
[[nodiscard]] int count(not_null<History*> history) const;
|
[[nodiscard]] int count(not_null<History*> history) const;
|
||||||
|
|
||||||
void checkEntitiesAndUpdate(const MTPDmessage &data);
|
void checkEntitiesAndUpdate(const MTPDmessage &data);
|
||||||
|
|
Loading…
Add table
Reference in a new issue