Parcourir la source

library: hide mini player in editing mode (refs #14654)

(cherry picked from commit 04e9383f4244d2615d33a320a5d902b7b70f7a71)
Felix Paul Kühne il y a 10 ans
Parent
commit
18250c3182
1 fichiers modifiés avec 9 ajouts et 2 suppressions
  1. 9 2
      Sources/VLCPlaylistViewController.m

+ 9 - 2
Sources/VLCPlaylistViewController.m

@@ -450,8 +450,13 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
     const CGRect miniPlayerFrameIn =  CGRectMake(0., viewRect.size.height-miniPlayerHeight, viewRect.size.width, miniPlayerHeight);
     const CGRect miniPlayerFrameOut = CGRectMake(0., viewRect.size.height, viewRect.size.width, miniPlayerHeight);
 
-    const BOOL needsShow = showMiniPlayer && !miniPlayerVisible;
-    const BOOL needsHide = !showMiniPlayer && miniPlayerVisible;
+    BOOL needsShow = showMiniPlayer && !miniPlayerVisible;
+    BOOL needsHide = !showMiniPlayer && miniPlayerVisible;
+
+    if (self.editing) {
+        needsHide = YES;
+        needsShow = NO;
+    }
 
     void (^completionBlock)(BOOL) = nil;
     if (needsShow) {
@@ -1100,6 +1105,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
 {
     [super setEditing:editing animated:animated];
 
+    [self displayMiniPlaybackViewIfNeeded];
+
     UIBarButtonItem *editButton = self.editButtonItem;
     NSString *editImage = editing? @"doneButton": @"button";
     NSString *editImageHighlight = editing? @"doneButtonHighlight": @"buttonHighlight";