Skip to content

Commit

Permalink
Fix camera layout
Browse files Browse the repository at this point in the history
  • Loading branch information
laktyushin committed Nov 5, 2024
1 parent d5010eb commit 8d44e4d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
}

TGPhotoEditorController *controller = [[TGPhotoEditorController alloc] initWithContext:[windowManager context] item:editableItem intent:intent adjustments:nil caption:nil screenImage:thumbnailImage availableTabs:[TGPhotoEditorController defaultTabsForAvatarIntent:!_disableStickers] selectedTab:TGPhotoEditorCropTab];
controller.modalPresentationStyle = UIModalPresentationFullScreen;
controller.editingContext = _editingContext;
controller.stickersContext = _stickersContext;
controller.dontHideStatusBar = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
}

TGPhotoEditorController *controller = [[TGPhotoEditorController alloc] initWithContext:_context item:editableItem intent:intent adjustments:nil caption:nil screenImage:thumbnailImage availableTabs:[TGPhotoEditorController defaultTabsForAvatarIntent:_intent != TGMediaAssetsControllerSetSignupProfilePhotoIntent] selectedTab:TGPhotoEditorCropTab];
controller.modalPresentationStyle = UIModalPresentationFullScreen;
controller.stickersContext = self.stickersContext;
controller.editingContext = self.editingContext;
controller.didFinishRenderingFullSizeImage = ^(UIImage *resultImage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ - (void)_displayCameraWithView:(TGAttachmentCameraView *)cameraView menuControll
controller = [[TGCameraController alloc] initWithContext:[windowManager context] saveEditedPhotos:_saveEditedPhotos saveCapturedMedia:_saveCapturedMedia camera:cameraView.previewView.camera previewView:cameraView.previewView intent:_signup ? TGCameraControllerSignupAvatarIntent : TGCameraControllerAvatarIntent];
else
controller = [[TGCameraController alloc] initWithContext:[windowManager context] saveEditedPhotos:_saveEditedPhotos saveCapturedMedia:_saveCapturedMedia intent:_signup ? TGCameraControllerSignupAvatarIntent : TGCameraControllerAvatarIntent];
controller.modalPresentationStyle = UIModalPresentationFullScreen;
controller.stickersContext = _stickersContext;
controller.shouldStoreCapturedAssets = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public func presentedLegacyCamera(context: AccountContext, peer: Peer?, chatLoca
} else {
controller = TGCameraController(context: legacyController.context, saveEditedPhotos: saveCapturedPhotos && !isSecretChat, saveCapturedMedia: saveCapturedPhotos && !isSecretChat)
}
controller.modalPresentationStyle = .fullScreen
controller.inhibitMultipleCapture = editingMedia

if !initialCaption.string.isEmpty {
Expand Down

0 comments on commit 8d44e4d

Please sign in to comment.