MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / remove

Method remove

Telegram/SourceFiles/storage/storage_shared_media.cpp:93–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void SharedMedia::remove(SharedMediaRemoveOne &&query) {
94 auto peerIt = _lists.lower_bound({ query.peerId, MsgId(0) });
95 while (peerIt != end(_lists) && peerIt->first.peerId == query.peerId) {
96 for (auto index = 0; index != kSharedMediaTypeCount; ++index) {
97 auto type = static_cast<SharedMediaType>(index);
98 if (query.types.test(type)) {
99 peerIt->second[index].removeOne(query.messageId);
100 }
101 }
102 ++peerIt;
103 }
104 _oneRemoved.fire(std::move(query));
105}
106
107void SharedMedia::remove(SharedMediaRemoveAll &&query) {
108 auto peerIt = _lists.lower_bound({

Callers

nothing calls this directly

Calls 5

testMethod · 0.80
MsgIdClass · 0.50
removeOneMethod · 0.45
fireMethod · 0.45
removeAllMethod · 0.45

Tested by

no test coverage detected