mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Video avatar fixes
This commit is contained in:
@@ -1766,6 +1766,28 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus
|
||||
});
|
||||
};
|
||||
|
||||
controller.didFinishEditingVideo = ^(NSURL *url, id<TGMediaEditAdjustments> adjustments, UIImage *resultImage, UIImage *thumbnailImage, bool hasChanges) {
|
||||
if (!hasChanges)
|
||||
return;
|
||||
|
||||
__strong TGCameraController *strongSelf = weakSelf;
|
||||
if (strongSelf == nil)
|
||||
return;
|
||||
|
||||
TGDispatchOnMainThread(^
|
||||
{
|
||||
if (strongSelf.finishedWithVideo != nil)
|
||||
strongSelf.finishedWithVideo(nil, url, resultImage, 0, CGSizeZero, adjustments, nil, nil, nil, nil);
|
||||
|
||||
__strong TGPhotoEditorController *strongController = weakController;
|
||||
if (strongController != nil)
|
||||
{
|
||||
[strongController updateStatusBarAppearanceForDismiss];
|
||||
[strongSelf _dismissTransitionForResultController:(TGOverlayController *)strongController];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
controller.requestThumbnailImage = ^(id<TGMediaEditableItem> editableItem)
|
||||
{
|
||||
return [editableItem thumbnailImageSignal];
|
||||
|
||||
Reference in New Issue
Block a user