mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Move some calls from App namespace.
This commit is contained in:
@@ -480,9 +480,9 @@ void SpecialSetReceived(
|
||||
auto custom = sets.find(CustomSetId);
|
||||
auto pack = Pack();
|
||||
pack.reserve(items.size());
|
||||
for_const (auto &mtpDocument, items) {
|
||||
for (const auto &item : items) {
|
||||
++dateIndex;
|
||||
auto document = Auth().data().document(mtpDocument);
|
||||
const auto document = Auth().data().processDocument(item);
|
||||
if (!document->sticker()) {
|
||||
continue;
|
||||
}
|
||||
@@ -662,10 +662,11 @@ void GifsReceived(const QVector<MTPDocument> &items, int32 hash) {
|
||||
saved.clear();
|
||||
|
||||
saved.reserve(items.size());
|
||||
for_const (auto &gif, items) {
|
||||
auto document = Auth().data().document(gif);
|
||||
for (const auto &item : items) {
|
||||
const auto document = Auth().data().processDocument(item);
|
||||
if (!document->isGifv()) {
|
||||
LOG(("API Error: bad document returned in HistoryWidget::savedGifsGot!"));
|
||||
LOG(("API Error: "
|
||||
"bad document returned in HistoryWidget::savedGifsGot!"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -917,13 +918,13 @@ Set *FeedSetFull(const MTPmessages_StickerSet &data) {
|
||||
|
||||
auto pack = Pack();
|
||||
pack.reserve(d_docs.size());
|
||||
for (auto i = 0, l = d_docs.size(); i != l; ++i) {
|
||||
auto doc = Auth().data().document(d_docs.at(i));
|
||||
if (!doc->sticker()) continue;
|
||||
for (const auto &item : d_docs) {
|
||||
const auto document = Auth().data().processDocument(item);
|
||||
if (!document->sticker()) continue;
|
||||
|
||||
pack.push_back(doc);
|
||||
pack.push_back(document);
|
||||
if (custom != sets.cend()) {
|
||||
auto index = custom->stickers.indexOf(doc);
|
||||
const auto index = custom->stickers.indexOf(document);
|
||||
if (index >= 0) {
|
||||
custom->stickers.removeAt(index);
|
||||
}
|
||||
|
Reference in New Issue
Block a user