Video avatar fixes

This commit is contained in:
Ilya Laktyushin
2020-06-25 23:52:55 +03:00
parent 0827116be2
commit ce066ef1cb
4 changed files with 23 additions and 10 deletions

View File

@@ -396,7 +396,13 @@
if (_intent == TGMediaAssetsControllerSetSignupProfilePhotoIntent) {
intent = TGPhotoEditorControllerSignupAvatarIntent;
}
TGPhotoEditorController *controller = [[TGPhotoEditorController alloc] initWithContext:_context item:asset intent:intent adjustments:nil caption:nil screenImage:thumbnailImage availableTabs:[TGPhotoEditorController defaultTabsForAvatarIntent] selectedTab:TGPhotoEditorCropTab];
id<TGMediaEditableItem> editableItem = asset;
if (asset.type == TGMediaAssetGifType) {
editableItem = [[TGCameraCapturedVideo alloc] initWithAsset:asset livePhoto:false];
}
TGPhotoEditorController *controller = [[TGPhotoEditorController alloc] initWithContext:_context item:editableItem intent:intent adjustments:nil caption:nil screenImage:thumbnailImage availableTabs:[TGPhotoEditorController defaultTabsForAvatarIntent] selectedTab:TGPhotoEditorCropTab];
controller.editingContext = self.editingContext;
controller.didFinishRenderingFullSizeImage = ^(UIImage *resultImage)
{