Fix iPad photo editor layout

This commit is contained in:
Ilya Laktyushin 2024-10-21 01:20:55 +04:00
parent 6f60e7c89e
commit dd0e8b66ac
2 changed files with 4 additions and 5 deletions

View File

@ -403,6 +403,7 @@
TGPhotoEditorControllerIntent intent = isVideo ? TGPhotoEditorControllerVideoIntent : TGPhotoEditorControllerGenericIntent; TGPhotoEditorControllerIntent intent = isVideo ? TGPhotoEditorControllerVideoIntent : TGPhotoEditorControllerGenericIntent;
TGPhotoEditorController *controller = [[TGPhotoEditorController alloc] initWithContext:_context item:editableMediaItem intent:intent adjustments:adjustments caption:caption screenImage:screenImage availableTabs:_interfaceView.currentTabs selectedTab:tab]; TGPhotoEditorController *controller = [[TGPhotoEditorController alloc] initWithContext:_context item:editableMediaItem intent:intent adjustments:adjustments caption:caption screenImage:screenImage availableTabs:_interfaceView.currentTabs selectedTab:tab];
controller.modalPresentationStyle = UIModalPresentationFullScreen;
controller.entitiesView = entitiesView; controller.entitiesView = entitiesView;
controller.editingContext = _editingContext; controller.editingContext = _editingContext;
controller.stickersContext = _stickersContext; controller.stickersContext = _stickersContext;

View File

@ -521,12 +521,10 @@ static id<LegacyComponentsContext> _defaultContext = nil;
- (bool)inFormSheet - (bool)inFormSheet
{ {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return false; return false;
else } else {
{ if ([self.navigationController isKindOfClass:[TGNavigationController class]]) {
if ([self.navigationController isKindOfClass:[TGNavigationController class]])
{
switch (((TGNavigationController *)self.navigationController).presentationStyle) switch (((TGNavigationController *)self.navigationController).presentationStyle)
{ {
case TGNavigationControllerPresentationStyleInFormSheet: case TGNavigationControllerPresentationStyleInFormSheet: