Browse Source

Fixing player UI issue where Multi Selection menu wouldn't properly display its items because of orientation detection going wrong.

Mathias Sauvestre 7 years ago
parent
commit
431963134f
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Sources/VLCMovieViewController.m

+ 4 - 3
Sources/VLCMovieViewController.m

@@ -449,7 +449,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         return;
     }
 
-    if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) {
+    if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
         _multiSelectionView.showsEqualizer = YES;
         multiSelectionFrame = (CGRect){CGPointMake(0., 0.), [_multiSelectionView proposedDisplaySize]};
         multiSelectionFrame.origin.x = controllerPanelFrame.size.width - multiSelectionFrame.size.width;
@@ -1141,10 +1141,11 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     }
 
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
-        if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation))
+        if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
             _multiSelectionView.showsEqualizer = YES;
-        else
+        } else {
             _multiSelectionView.showsEqualizer = NO;
+        }
     }
 
     CGRect workFrame = _multiSelectionView.frame;