Browse Source

iOS: Fix long press gesture continuous call to editmode

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Soomin Lee 8 years ago
parent
commit
7e4ae0fa4c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Sources/VLCLibraryViewController.m

+ 2 - 1
Sources/VLCLibraryViewController.m

@@ -1215,7 +1215,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
 
 - (void)_collectionViewHandleLongPressGesture:(UIGestureRecognizer *) sender
 {
-    [self setEditing:YES animated:YES];
+    if (sender.state == UIGestureRecognizerStateBegan && !self.isEditing)
+        [self setEditing:YES animated:YES];
 }
 
 #pragma mark - UI implementation