Chat wallpaper improvements

This commit is contained in:
Ilya Laktyushin
2023-04-11 22:25:41 +04:00
parent eb7ad97b3a
commit 62470a424f
37 changed files with 974 additions and 169 deletions

View File

@@ -338,10 +338,10 @@
- (void)presentPhotoEditorForItem:(id<TGModernGalleryEditableItem>)item tab:(TGPhotoEditorTab)tab
{
[self presentPhotoEditorForItem:item tab:tab snapshots:@[]];
[self presentPhotoEditorForItem:item tab:tab snapshots:@[] fromRect:CGRectZero];
}
- (void)presentPhotoEditorForItem:(id<TGModernGalleryEditableItem>)item tab:(TGPhotoEditorTab)tab snapshots:(NSArray *)snapshots
- (void)presentPhotoEditorForItem:(id<TGModernGalleryEditableItem>)item tab:(TGPhotoEditorTab)tab snapshots:(NSArray *)snapshots fromRect:(CGRect)fromRect
{
__weak TGMediaPickerGalleryModel *weakSelf = self;
@@ -356,12 +356,15 @@
CGRect refFrame = CGRectZero;
UIView *editorReferenceView = [self referenceViewForItem:item frame:&refFrame];
if (!CGRectEqualToRect(fromRect, CGRectZero)) {
refFrame = fromRect;
}
UIView *referenceView = nil;
UIImage *screenImage = nil;
UIView *referenceParentView = nil;
UIImage *image = nil;
UIView<TGPhotoDrawingEntitiesView> *entitiesView = nil;
UIView<TGPhotoDrawingEntitiesView> *entitiesView = nil;
id<TGMediaEditableItem> editableMediaItem = item.editableMediaItem;