2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Moved out extracting of attached stickers from Scene to FileLoadTask.

This commit is contained in:
23rd
2022-01-10 08:02:26 +03:00
committed by John Preston
parent ab248febcd
commit f8be5731a5
3 changed files with 15 additions and 18 deletions

View File

@@ -120,18 +120,6 @@ std::vector<ItemPtr> Scene::items(
return copyItems;
}
std::vector<not_null<DocumentData*>> Scene::attachedStickers() const {
const auto allItems = items();
return ranges::views::all(
allItems
) | ranges::views::filter([](const ItemPtr &i) {
return i->isVisible() && (i->type() == ItemSticker::Type);
}) | ranges::views::transform([](const ItemPtr &i) {
return static_cast<ItemSticker*>(i.get())->sticker();
}) | ranges::to_vector;
}
std::shared_ptr<float64> Scene::lastZ() const {
return _lastZ;
}

View File

@@ -39,9 +39,6 @@ public:
[[nodiscard]] rpl::producer<> addsItem() const;
[[nodiscard]] rpl::producer<> removesItem() const;
[[nodiscard]] auto attachedStickers() const
-> std::vector<not_null<DocumentData*>>;
[[nodiscard]] std::shared_ptr<float64> lastZ() const;
void updateZoom(float64 zoom);