Fix landscape bug when closing fullscreen view of image

This commit is contained in:
Benjamin Verdier 2018-06-12 14:46:07 +02:00
parent 59c1b30709
commit 531dcf691b

View file

@ -393,7 +393,7 @@ static const CGFloat CELL_MESSAGE_Y_MARGIN = 52; // 44;
+ (CGSize)getMediaMessageSizefromOriginalSize:(CGSize)originalSize withWidth:(int)width {
CGSize mediaSize = CGSizeMake(0, 0);
int availableWidth = width - CELL_MESSAGE_X_MARGIN;
if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation])) {
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
availableWidth = availableWidth /3;
}
int height = originalSize.height;