| 4743 | } |
| 4744 | |
| 4745 | not_null<Data::CloudImage*> Session::location(const LocationPoint &point) { |
| 4746 | const auto i = _locations.find(point); |
| 4747 | if (i != _locations.cend()) { |
| 4748 | return i->second.get(); |
| 4749 | } |
| 4750 | const auto location = Data::ComputeLocation(point); |
| 4751 | const auto prepared = ImageWithLocation{ |
| 4752 | .location = ImageLocation( |
| 4753 | { location }, |
| 4754 | location.width, |
| 4755 | location.height) |
| 4756 | }; |
| 4757 | return _locations.emplace( |
| 4758 | point, |
| 4759 | std::make_unique<Data::CloudImage>( |
| 4760 | _session, |
| 4761 | prepared)).first->second.get(); |
| 4762 | } |
| 4763 | |
| 4764 | void Session::registerPhotoItem( |
| 4765 | not_null<const PhotoData*> photo, |
no test coverage detected