Pārlūkot izejas kodu

VLCLibraryController: delete leftover code form old LibraryViewController and folderlayout

Carola Nitz 7 gadi atpakaļ
vecāks
revīzija
f2b1fe4f09

+ 0 - 1
Podfile

@@ -21,7 +21,6 @@ target 'VLC-iOS' do
   pod 'HockeySDK', '~>5.1.2', :subspecs => ['CrashOnlyLib']
   pod 'PAPasscode', '~>1.0'
   pod 'GoogleAPIClient/Drive'
-  pod 'VLC-LXReorderableCollectionViewFlowLayout', '0.1.3v'
   pod 'MediaLibraryKit-prod'
   pod 'MobileVLCKit', '3.0.2'
   pod 'GTMAppAuth'

+ 1 - 4
Podfile.lock

@@ -54,7 +54,6 @@ PODS:
   - TVVLCKit (3.0.2)
   - upnpx (1.4.0)
   - VLC-LiveSDK (5.7.0x)
-  - VLC-LXReorderableCollectionViewFlowLayout (0.1.3v)
   - VLC-WhiteRaccoon (1.0.0)
   - XKKeychain (1.0.1)
   - xmlrpc (2.3.4):
@@ -81,7 +80,6 @@ DEPENDENCIES:
   - TVVLCKit (= 3.0.2)
   - upnpx (~> 1.4.0)
   - VLC-LiveSDK (= 5.7.0x)
-  - VLC-LXReorderableCollectionViewFlowLayout (= 0.1.3v)
   - VLC-WhiteRaccoon
   - XKKeychain (~> 1.0)
 
@@ -141,11 +139,10 @@ SPEC CHECKSUMS:
   TVVLCKit: 178e4f82f8b57320774821384e42eaac403d2faa
   upnpx: c695b99229e08154d23abe5c252cb64f1600f35d
   VLC-LiveSDK: c9566a9edde968f969138f84cfd40b540a109b3f
-  VLC-LXReorderableCollectionViewFlowLayout: 0204946967b746ca183835e854826290be06e2f4
   VLC-WhiteRaccoon: 1e7e59b0568959135a89d09c416d1e11a5d9a986
   XKKeychain: 852ef663c56a7194c73d3c68e8d9d4f07b121d4f
   xmlrpc: 109bb21d15ed6d108b2c1ac5973a6a223a50f5f4
 
-PODFILE CHECKSUM: 370bc7ee6bd5a15fdfe602027f7e63241e8d1c1a
+PODFILE CHECKSUM: 18e842bb60930b5cb796659752398c4976a14d88
 
 COCOAPODS: 1.4.0

+ 0 - 11
Resources/en.lproj/Localizable.strings

@@ -97,9 +97,6 @@
 "FILE_NOT_SUPPORTED" = "File format not supported";
 "SCHEME_NOT_SUPPORTED" = "Address scheme not supported";
 "SCHEME_NOT_SUPPORTED_LONG" = "The address scheme (%@) is not supported. Please use an address starting with HTTP, HTTPS or FTP.";
-"LIBRARY_ALL_FILES" = "All Files";
-"LIBRARY_MUSIC" = "Music Albums";
-"LIBRARY_SERIES" = "TV Shows";
 "LIBRARY_TRACKS" = "%i Tracks";
 "LIBRARY_SINGLE_TRACK" = "%i Track";
 "LIBRARY_EPISODES" = "%i Episodes, %i unread";
@@ -108,14 +105,6 @@
 "LIBRARY_MINUTES_LEFT" = "%@m left";
 "RENAME_MEDIA_TO" = "Enter new name for %@";
 
-"FOLDER_INVALID_TYPE_TITLE" = "Invalid file types";
-"FOLDER_INVALID_TYPE_MESSAGE" = "You can only take two files to form a folder or add a single file to an existing folder.";
-"FOLDER_CHOOSE_NAME_TITLE" = "New Folder";
-"FOLDER_CHOOSE_NAME_MESSAGE" = "Enter a title for your folder";
-"FOLDER_NAME_PLACEHOLDER" = "Folder Title";
-"FOLDER_NAME_DUPLICATE_TITLE" = "Title exists";
-"FOLDER_NAME_DUPLICATE_MESSAGE" = "Please choose a different title";
-"SELECT_FOLDER" = "Select a Folder";
 
 "SHARING_ACTION_SHEET_TITLE_CHOOSE_FILE" = "Choose a file to open:";
 "SHARING_ACTIVITY_OPEN_IN_TITLE" = "Open In...";

+ 0 - 1
Sources/VLCDocumentPickerController.m

@@ -13,7 +13,6 @@
 #import "VLCDocumentPickerController.h"
 #import <MobileCoreServices/MobileCoreServices.h>
 #import "VLCMediaFileDiscoverer.h"
-#import "VLCLibraryViewController.h"
 
 @interface VLCDocumentPickerController () <UIDocumentMenuDelegate, UIDocumentPickerDelegate>
 

+ 0 - 25
Sources/VLCFolderCollectionViewFlowLayout.h

@@ -1,25 +0,0 @@
-/*****************************************************************************
- * VLCFolderCollectionViewFlowLayout.h
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2014 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Carola Nitz <nitz.carola # googlemail.com>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-@interface VLCFolderCollectionViewFlowLayout : UICollectionViewFlowLayout <UIGestureRecognizerDelegate>
-
-@property (assign, nonatomic) CGFloat scrollingSpeed;
-@property (assign, nonatomic) UIEdgeInsets scrollingTriggerEdgeInsets;
-@property (nonatomic, readonly) UILongPressGestureRecognizer *longPressGestureRecognizer;
-@property (nonatomic, readonly) UIPanGestureRecognizer *panGestureRecognizer;
-
-@end
-
-@protocol VLCFolderCollectionViewDelegateFlowLayout <UICollectionViewDelegateFlowLayout>
-
-- (void)collectionView:(UICollectionView *)collectionView requestToMoveItemAtIndexPath:(NSIndexPath *)currentPath intoFolderAtIndexPath:(NSIndexPath *)newIndexPath;
-@end

+ 0 - 481
Sources/VLCFolderCollectionViewFlowLayout.m

@@ -1,481 +0,0 @@
-/*****************************************************************************
- * VLCFolderCollectionViewFlowLayout.m
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2014 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Carola Nitz <nitz.carola # googlemail.com>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-#import "VLCFolderCollectionViewFlowLayout.h"
-#import <objc/runtime.h>
-#import "VLCLibraryViewController.h"
-
-//framrate were motion appears fluent
-#define LX_FRAMES_PER_SECOND 60.0
-
-#ifndef CGGEOMETRY_LXSUPPORT_H_
-CG_INLINE CGPoint
-LXS_CGPointAdd(CGPoint point1, CGPoint point2) {
-    return CGPointMake(point1.x + point2.x, point1.y + point2.y);
-}
-#endif
-
-typedef NS_ENUM(NSInteger, LXScrollingDirection) {
-    LXScrollingDirectionUnknown = 0,
-    LXScrollingDirectionUp,
-    LXScrollingDirectionDown,
-    LXScrollingDirectionLeft,
-    LXScrollingDirectionRight
-};
-
-static NSString * const kLXScrollingDirectionKey = @"LXScrollingDirection";
-static NSString * const kLXCollectionViewKeyPath = @"collectionView";
-
-@interface CADisplayLink (LX_userInfo)
-@property (nonatomic, copy) NSDictionary *LX_userInfo;
-@end
-
-@implementation CADisplayLink (LX_userInfo)
-- (void) setLX_userInfo:(NSDictionary *) LX_userInfo {
-    objc_setAssociatedObject(self, "LX_userInfo", LX_userInfo, OBJC_ASSOCIATION_COPY);
-}
-
-- (NSDictionary *) LX_userInfo {
-    return objc_getAssociatedObject(self, "LX_userInfo");
-}
-@end
-
-@interface UICollectionViewCell (VLCFolderCollectionViewLayout)
-
-- (UIImage *)LX_rasterizedImage;
-
-@end
-
-@implementation UICollectionViewCell (VLCFolderCollectionViewLayout)
-
-- (UIImage *)LX_rasterizedImage {
-    UIGraphicsBeginImageContextWithOptions(self.bounds.size, self.isOpaque, 0.0f);
-    [self.layer renderInContext:UIGraphicsGetCurrentContext()];
-    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
-    UIGraphicsEndImageContext();
-    return image;
-}
-
-@end
-
-@interface VLCFolderCollectionViewFlowLayout ()
-{
-    NSIndexPath *_selectedItemIndexPath;
-    UIView *_currentView;
-    CGPoint _currentViewCenter;
-    CGPoint _panTranslationInCollectionView;
-    CADisplayLink *_displayLink;
-    UIView *_folderView;
-    BOOL _didPan;
-}
-
-@end
-
-@implementation VLCFolderCollectionViewFlowLayout
-
-- (void)setDefaults {
-    _scrollingSpeed = 300.0f;
-    _scrollingTriggerEdgeInsets = UIEdgeInsetsMake(50.0f, 50.0f, 50.0f, 50.0f);
-}
-
-- (void)setupCollectionView {
-    _longPressGestureRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self
-                                                                                action:@selector(handleLongPressGesture:)];
-    _longPressGestureRecognizer.delegate = self;
-
-    // Links the default long press gesture recognizer to the custom long press gesture recognizer we are creating now
-    // by enforcing failure dependency so that they doesn't clash.
-    for (UIGestureRecognizer *gestureRecognizer in self.collectionView.gestureRecognizers) {
-        if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) {
-            [gestureRecognizer requireGestureRecognizerToFail:_longPressGestureRecognizer];
-        }
-    }
-
-    [self.collectionView addGestureRecognizer:_longPressGestureRecognizer];
-
-    _panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self
-                                                                    action:@selector(handlePanGesture:)];
-    _panGestureRecognizer.delegate = self;
-    [self.collectionView addGestureRecognizer:_panGestureRecognizer];
-
-    // Useful in multiple scenarios: one common scenario being when the Notification Center drawer is pulled down
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleApplicationWillResignActive:) name: UIApplicationWillResignActiveNotification object:nil];
-}
-
-- (id)init {
-    self = [super init];
-    if (self) {
-        [self setDefaults];
-        [self addObserver:self forKeyPath:kLXCollectionViewKeyPath options:NSKeyValueObservingOptionNew context:nil];
-    }
-    return self;
-}
-
-- (id)initWithCoder:(NSCoder *)aDecoder {
-    self = [super initWithCoder:aDecoder];
-    if (self) {
-        [self setDefaults];
-        [self addObserver:self forKeyPath:kLXCollectionViewKeyPath options:NSKeyValueObservingOptionNew context:nil];
-    }
-    return self;
-}
-
-- (void)dealloc {
-    [self invalidatesScrollTimer];
-    [self removeObserver:self forKeyPath:kLXCollectionViewKeyPath];
-    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil];
-}
-
-- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
-    if ([layoutAttributes.indexPath isEqual:_selectedItemIndexPath])
-        layoutAttributes.hidden = YES;
-}
-
-- (id<VLCFolderCollectionViewDelegateFlowLayout>)delegate {
-    return (id<VLCFolderCollectionViewDelegateFlowLayout>)self.collectionView.delegate;
-}
-
-- (void)invalidateLayoutIfNecessary {
-    NSIndexPath *newIndexPath = [self.collectionView indexPathForItemAtPoint:_currentView.center];
-    NSIndexPath *previousIndexPath = _selectedItemIndexPath;
-
-    if ((newIndexPath == nil) || [newIndexPath isEqual:previousIndexPath]) {
-        _currentView.transform = CGAffineTransformMakeScale(1.1f, 1.1f);
-        [_folderView removeFromSuperview];
-        return;
-    }
-
-    UICollectionViewCell *cell = [self.collectionView.dataSource collectionView:self.collectionView cellForItemAtIndexPath:newIndexPath];
-    if (!_folderView) {
-        _folderView = [[UIView alloc] initWithFrame:cell.frame];
-        _folderView.backgroundColor = [UIColor VLCOrangeTintColor];
-        _folderView.layer.cornerRadius = 8;
-    }
-    [self.collectionView insertSubview:_folderView atIndex:0];
-
-    if (!CGPointEqualToPoint(_folderView.center,cell.center))
-        _folderView.frame = cell.frame;
-
-    [UIView
-     animateWithDuration:0.3
-     delay:0.0
-     options:UIViewAnimationOptionBeginFromCurrentState
-     animations:^{
-         _currentView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
-     }
-     completion:nil];
-}
-
-- (void)invalidatesScrollTimer {
-    if (!_displayLink.paused)
-        [_displayLink invalidate];
-    _displayLink = nil;
-}
-
-- (void)setupScrollTimerInDirection:(LXScrollingDirection)direction {
-    if (!_displayLink.paused) {
-        LXScrollingDirection oldDirection = [_displayLink.LX_userInfo[kLXScrollingDirectionKey] integerValue];
-
-        if (direction == oldDirection)
-            return;
-    }
-
-    [self invalidatesScrollTimer];
-
-    _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(handleScroll:)];
-    _displayLink.LX_userInfo = @{ kLXScrollingDirectionKey : @(direction) };
-
-    [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
-}
-
-#pragma mark - Target/Action methods
-// Tight loop, allocate memory sparely, even if they are stack allocation.
-- (void)handleScroll:(CADisplayLink *)displayLink {
-    LXScrollingDirection direction = (LXScrollingDirection)[displayLink.LX_userInfo[kLXScrollingDirectionKey] integerValue];
-    if (direction == LXScrollingDirectionUnknown)
-        return;
-
-    CGSize frameSize = self.collectionView.bounds.size;
-    CGSize contentSize = self.collectionView.contentSize;
-    CGPoint contentOffset = self.collectionView.contentOffset;
-    // Important to have an integer `distance` as the `contentOffset` property automatically gets rounded
-    // and it would diverge from the view's center resulting in a "cell is slipping away under finger"-bug.
-    CGFloat distance = rint(self.scrollingSpeed / LX_FRAMES_PER_SECOND);
-    CGPoint translation = CGPointZero;
-
-    switch(direction) {
-        case LXScrollingDirectionUp: {
-            distance = -distance;
-            CGFloat minY = 0.0f;
-
-            if ((contentOffset.y + distance) <= minY)
-                distance = -contentOffset.y;
-
-            translation = CGPointMake(0.0f, distance);
-        } break;
-        case LXScrollingDirectionDown: {
-            CGFloat maxY = MAX(contentSize.height, frameSize.height) - frameSize.height;
-
-            if ((contentOffset.y + distance) >= maxY)
-                distance = maxY - contentOffset.y;
-
-            translation = CGPointMake(0.0f, distance);
-        } break;
-        case LXScrollingDirectionLeft: {
-
-            distance = -distance;
-            CGFloat minX = 0.0f;
-
-            if ((contentOffset.x + distance) <= minX)
-                distance = -contentOffset.x;
-
-            translation = CGPointMake(distance, 0.0f);
-        } break;
-        case LXScrollingDirectionRight: {
-            CGFloat maxX = MAX(contentSize.width, frameSize.width) - frameSize.width;
-
-            if ((contentOffset.x + distance) >= maxX)
-                distance = maxX - contentOffset.x;
-
-            translation = CGPointMake(distance, 0.0f);
-        } break;
-        default: {
-            // Do nothing...
-        } break;
-    }
-    _currentViewCenter = LXS_CGPointAdd(_currentViewCenter, translation);
-    _currentView.center = LXS_CGPointAdd(_currentViewCenter, _panTranslationInCollectionView);
-    self.collectionView.contentOffset = LXS_CGPointAdd(contentOffset, translation);
-}
-
-- (void)handleLongPressGesture:(UILongPressGestureRecognizer *)gestureRecognizer {
-    //keeps the controller from dragging while not in editmode
-    if (!((VLCLibraryViewController *)self.delegate).isEditing) return;
-
-    switch(gestureRecognizer.state) {
-        case UIGestureRecognizerStateBegan: {
-            NSIndexPath *currentIndexPath = [self.collectionView indexPathForItemAtPoint:[gestureRecognizer locationInView:self.collectionView]];
-            _selectedItemIndexPath = currentIndexPath;
-
-            UICollectionViewCell *collectionViewCell = [self.collectionView cellForItemAtIndexPath:_selectedItemIndexPath];
-
-            _currentView = [[UIView alloc] initWithFrame:collectionViewCell.frame];
-
-            collectionViewCell.highlighted = YES;
-            UIImageView *highlightedImageView = [[UIImageView alloc] initWithImage:[collectionViewCell LX_rasterizedImage]];
-            highlightedImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-            highlightedImageView.alpha = 1.0f;
-
-            collectionViewCell.highlighted = NO;
-            UIImageView *imageView = [[UIImageView alloc] initWithImage:[collectionViewCell LX_rasterizedImage]];
-            imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-            imageView.alpha = 0.0f;
-
-            [_currentView addSubview:imageView];
-            [_currentView addSubview:highlightedImageView];
-            [self.collectionView addSubview:_currentView];
-
-            _currentViewCenter = _currentView.center;
-
-            [UIView
-             animateWithDuration:0.3
-             delay:0.0
-             options:UIViewAnimationOptionBeginFromCurrentState
-             animations:^{
-                 _currentView.transform = CGAffineTransformMakeScale(1.1f, 1.1f);
-                 highlightedImageView.alpha = 0.0f;
-                 imageView.alpha = 1.0f;
-             }
-             completion:^(BOOL finished) {
-                [highlightedImageView removeFromSuperview];
-             }];
-
-            [self invalidateLayout];
-        } break;
-        case UIGestureRecognizerStateCancelled:
-        case UIGestureRecognizerStateEnded: {
-            if (_didPan) return;
-
-            NSIndexPath *currentIndexPath = _selectedItemIndexPath;
-
-            if (currentIndexPath) {
-                _selectedItemIndexPath = nil;
-                _currentViewCenter = CGPointZero;
-
-                UICollectionViewLayoutAttributes *layoutAttributes = [self layoutAttributesForItemAtIndexPath:currentIndexPath];
-
-                [UIView
-                 animateWithDuration:0.3
-                 delay:0.0
-                 options:UIViewAnimationOptionBeginFromCurrentState
-                 animations:^{
-                     _currentView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
-                     _currentView.center = layoutAttributes.center;
-                 }
-                 completion:^(BOOL finished) {
-
-                     [_currentView removeFromSuperview];
-                     _currentView = nil;
-                     [self invalidateLayout];
-
-                 }];
-            }
-        } break;
-
-        default: break;
-    }
-}
-
-- (void)handlePanGesture:(UIPanGestureRecognizer *)gestureRecognizer {
-
-    switch (gestureRecognizer.state) {
-        case UIGestureRecognizerStateBegan:
-            _didPan = YES;
-        case UIGestureRecognizerStateChanged: {
-            _panTranslationInCollectionView = [gestureRecognizer translationInView:self.collectionView];
-            CGPoint viewCenter = _currentView.center = LXS_CGPointAdd(_currentViewCenter, _panTranslationInCollectionView);
-            [self invalidateLayoutIfNecessary];
-
-            switch (self.scrollDirection) {
-                case UICollectionViewScrollDirectionVertical: {
-                    if (viewCenter.y < (CGRectGetMinY(self.collectionView.bounds) + self.scrollingTriggerEdgeInsets.top)) {
-                        [self setupScrollTimerInDirection:LXScrollingDirectionUp];
-                    } else {
-                        if (viewCenter.y > (CGRectGetMaxY(self.collectionView.bounds) - self.scrollingTriggerEdgeInsets.bottom)) {
-                            [self setupScrollTimerInDirection:LXScrollingDirectionDown];
-                        } else {
-                            [self invalidatesScrollTimer];
-                        }
-                    }
-                } break;
-                case UICollectionViewScrollDirectionHorizontal: {
-                    if (viewCenter.x < (CGRectGetMinX(self.collectionView.bounds) + self.scrollingTriggerEdgeInsets.left)) {
-                        [self setupScrollTimerInDirection:LXScrollingDirectionLeft];
-                    } else {
-                        if (viewCenter.x > (CGRectGetMaxX(self.collectionView.bounds) - self.scrollingTriggerEdgeInsets.right)) {
-                            [self setupScrollTimerInDirection:LXScrollingDirectionRight];
-                        } else {
-                            [self invalidatesScrollTimer];
-                        }
-                    }
-                } break;
-            }
-        } break;
-        case UIGestureRecognizerStateCancelled:
-        case UIGestureRecognizerStateEnded: {
-            _didPan = NO;
-            [_folderView removeFromSuperview];
-            _folderView = nil;
-            NSIndexPath *newIndexPath = [self.collectionView indexPathForItemAtPoint:_currentView.center];
-            NSIndexPath *currentIndexPath = _selectedItemIndexPath;
-
-            if (newIndexPath != nil && ![currentIndexPath isEqual:newIndexPath] && ((VLCLibraryViewController *)self.delegate).isEditing) {
-                [UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
-                    _currentView.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
-                    _currentView.center = [self layoutAttributesForItemAtIndexPath:newIndexPath].center;
-                } completion:^(BOOL finished) {
-                    [self.delegate collectionView:self.collectionView requestToMoveItemAtIndexPath:currentIndexPath intoFolderAtIndexPath:newIndexPath];
-                    _selectedItemIndexPath = nil;
-                    _currentViewCenter = CGPointZero;
-                    [_currentView removeFromSuperview];
-                    _currentView = nil;
-                }];
-            } else if (currentIndexPath) {
-                [UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
-                    _currentView.center = [self layoutAttributesForItemAtIndexPath:currentIndexPath].center;
-                } completion:^(BOOL finished) {
-                    _selectedItemIndexPath = nil;
-                    _currentViewCenter = CGPointZero;
-                    [_currentView removeFromSuperview];
-                    _currentView = nil;
-                    [self invalidateLayout];
-                }];
-            }
-            [self invalidatesScrollTimer];
-        } break;
-        default: {
-            // Do nothing...
-        } break;
-    }
-}
-
-#pragma mark - UICollectionViewLayout overridden methods
-
-- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect {
-    NSArray *layoutAttributesForElementsInRect = [super layoutAttributesForElementsInRect:rect];
-
-    for (UICollectionViewLayoutAttributes *layoutAttributes in layoutAttributesForElementsInRect) {
-        switch (layoutAttributes.representedElementCategory) {
-            case UICollectionElementCategoryCell: {
-                [self applyLayoutAttributes:layoutAttributes];
-            } break;
-            default: {
-                // Do nothing...
-            } break;
-        }
-    }
-    return layoutAttributesForElementsInRect;
-}
-
-- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
-    UICollectionViewLayoutAttributes *layoutAttributes = [super layoutAttributesForItemAtIndexPath:indexPath];
-
-    switch (layoutAttributes.representedElementCategory) {
-        case UICollectionElementCategoryCell: {
-            [self applyLayoutAttributes:layoutAttributes];
-        } break;
-        default: {
-            // Do nothing...
-        } break;
-    }
-
-    return layoutAttributes;
-}
-#pragma mark - UIGestureRecognizerDelegate methods
-
-- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
-    if ([self.panGestureRecognizer isEqual:gestureRecognizer]) {
-        return (_selectedItemIndexPath != nil);
-    }
-    return YES;
-}
-
-- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
-    if ([self.longPressGestureRecognizer isEqual:gestureRecognizer]) {
-        return [self.panGestureRecognizer isEqual:otherGestureRecognizer];
-    }
-
-    if ([self.panGestureRecognizer isEqual:gestureRecognizer]) {
-        return [self.longPressGestureRecognizer isEqual:otherGestureRecognizer];
-    }
-    return NO;
-}
-
-#pragma mark - Key-Value Observing methods
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
-    if ([keyPath isEqualToString:kLXCollectionViewKeyPath]) {
-        if (self.collectionView != nil) {
-            [self setupCollectionView];
-        } else {
-            [self invalidatesScrollTimer];
-        }
-    }
-}
-#pragma mark - Notifications
-
-- (void)handleApplicationWillResignActive:(NSNotification *)notification {
-    self.panGestureRecognizer.enabled = NO;
-    self.panGestureRecognizer.enabled = YES;
-}
-
-@end

+ 0 - 29
Sources/VLCLibraryViewController.h

@@ -1,29 +0,0 @@
-/*****************************************************************************
- * VLCLibraryViewController.h
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2013 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Felix Paul Kühne <fkuehne # videolan.org>
- *          Gleb Pinigin <gpinigin # gmail.com>
- *          Mike JS. Choi <mkchoi212 # icloud.com>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-#import <UIKit/UIKit.h>
-
-#define EXPERIMENTAL_LIBRARY 1
-
-#import "MLMediaLibrary+playlist.h"
-
-@interface VLCLibraryViewController : UIViewController <UITabBarDelegate, UIPopoverControllerDelegate>
-
-- (IBAction)leftButtonAction:(id)sender;
-
-- (void)updateViewContents;
-- (void)removeMediaObject:(id)mediaObject updateDatabase:(BOOL)updateDB;
-- (void)setLibraryMode:(VLCLibraryMode)mode;
-
-@end

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1431
Sources/VLCLibraryViewController.m


+ 0 - 1
Sources/VLCOpenNetworkStreamViewController.m

@@ -14,7 +14,6 @@
 
 #import "VLCOpenNetworkStreamViewController.h"
 #import "VLCPlaybackController.h"
-#import "VLCLibraryViewController.h"
 #import "VLCStreamingHistoryCell.h"
 #import "UIDevice+VLC.h"
 #import "VLC_iOS-Swift.h"

+ 0 - 12
VLC.xcodeproj/project.pbxproj

@@ -19,7 +19,6 @@
 		414396C22023316C005E3FAF /* AppearanceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 414396C12023316C005E3FAF /* AppearanceManager.swift */; };
 		4144C4661A0ED6C700918C89 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784E6183A99E1009EE944 /* Reachability.m */; };
 		4152F1621FEF19BD00F1908B /* KeychainCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4152F1611FEF19BD00F1908B /* KeychainCoordinator.swift */; };
-		4171D35018A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4171D34F18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m */; };
 		417CDA231A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 417CDA211A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m */; };
 		417CDA241A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */; };
 		417D7F601F7BA26200DDF36A /* VLCRemoteControlService.m in Sources */ = {isa = PBXBuildFile; fileRef = 417D7F5F1F7BA26200DDF36A /* VLCRemoteControlService.m */; };
@@ -99,7 +98,6 @@
 		7D378492183A98BF009EE944 /* VLCExternalDisplayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D378491183A98BF009EE944 /* VLCExternalDisplayController.m */; };
 		7D378499183A98D1009EE944 /* VLCPlaylistCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D378494183A98D1009EE944 /* VLCPlaylistCollectionViewCell.m */; };
 		7D37849A183A98D1009EE944 /* VLCPlaylistTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D378496183A98D1009EE944 /* VLCPlaylistTableViewCell.m */; };
-		7D37849B183A98D1009EE944 /* VLCLibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D378498183A98D1009EE944 /* VLCLibraryViewController.m */; };
 		7D37849E183A98DD009EE944 /* VLCThumbnailsCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D37849D183A98DD009EE944 /* VLCThumbnailsCache.m */; };
 		7D3784A1183A98EB009EE944 /* VLCBugreporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784A0183A98EB009EE944 /* VLCBugreporter.m */; };
 		7D3784A6183A98F5009EE944 /* VLCAboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784A3183A98F5009EE944 /* VLCAboutViewController.m */; };
@@ -493,8 +491,6 @@
 		414396C12023316C005E3FAF /* AppearanceManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppearanceManager.swift; path = Sources/AppearanceManager.swift; sourceTree = SOURCE_ROOT; };
 		4152F1611FEF19BD00F1908B /* KeychainCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = KeychainCoordinator.swift; path = Sources/KeychainCoordinator.swift; sourceTree = "<group>"; };
 		416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LayoutAnchorContainer.swift; path = Sources/LayoutAnchorContainer.swift; sourceTree = "<group>"; };
-		4171D34E18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCFolderCollectionViewFlowLayout.h; path = Sources/VLCFolderCollectionViewFlowLayout.h; sourceTree = SOURCE_ROOT; };
-		4171D34F18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCFolderCollectionViewFlowLayout.m; path = Sources/VLCFolderCollectionViewFlowLayout.m; sourceTree = SOURCE_ROOT; };
 		417CDA201A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCCloudServicesTableViewController.h; path = Sources/VLCCloudServicesTableViewController.h; sourceTree = SOURCE_ROOT; };
 		417CDA211A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCCloudServicesTableViewController.m; path = Sources/VLCCloudServicesTableViewController.m; sourceTree = SOURCE_ROOT; };
 		417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCCloudServicesTableViewController.xib; path = Resources/VLCCloudServicesTableViewController.xib; sourceTree = SOURCE_ROOT; };
@@ -715,8 +711,6 @@
 		7D378494183A98D1009EE944 /* VLCPlaylistCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCPlaylistCollectionViewCell.m; path = Sources/VLCPlaylistCollectionViewCell.m; sourceTree = SOURCE_ROOT; };
 		7D378495183A98D1009EE944 /* VLCPlaylistTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCPlaylistTableViewCell.h; path = Sources/VLCPlaylistTableViewCell.h; sourceTree = SOURCE_ROOT; };
 		7D378496183A98D1009EE944 /* VLCPlaylistTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCPlaylistTableViewCell.m; path = Sources/VLCPlaylistTableViewCell.m; sourceTree = SOURCE_ROOT; };
-		7D378497183A98D1009EE944 /* VLCLibraryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCLibraryViewController.h; path = Sources/VLCLibraryViewController.h; sourceTree = SOURCE_ROOT; };
-		7D378498183A98D1009EE944 /* VLCLibraryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCLibraryViewController.m; path = Sources/VLCLibraryViewController.m; sourceTree = SOURCE_ROOT; };
 		7D37849C183A98DD009EE944 /* VLCThumbnailsCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCThumbnailsCache.h; path = Sources/VLCThumbnailsCache.h; sourceTree = SOURCE_ROOT; };
 		7D37849D183A98DD009EE944 /* VLCThumbnailsCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCThumbnailsCache.m; path = Sources/VLCThumbnailsCache.m; sourceTree = SOURCE_ROOT; };
 		7D37849F183A98EB009EE944 /* VLCBugreporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCBugreporter.h; path = Sources/VLCBugreporter.h; sourceTree = SOURCE_ROOT; };
@@ -1531,14 +1525,10 @@
 				418B145520179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift */,
 				418B145820179E50000447AA /* VLCDragAndDropManager.swift */,
 				41251ECB1FD0C5C100099110 /* VLC-iOS-Bridging-Header.h */,
-				4171D34E18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.h */,
-				4171D34F18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m */,
 				7D378493183A98D1009EE944 /* VLCPlaylistCollectionViewCell.h */,
 				7D378494183A98D1009EE944 /* VLCPlaylistCollectionViewCell.m */,
 				7D378495183A98D1009EE944 /* VLCPlaylistTableViewCell.h */,
 				7D378496183A98D1009EE944 /* VLCPlaylistTableViewCell.m */,
-				7D378497183A98D1009EE944 /* VLCLibraryViewController.h */,
-				7D378498183A98D1009EE944 /* VLCLibraryViewController.m */,
 				CADFAD06207D128200103F33 /* VLCEmptyLibraryView.h */,
 				CADFAD07207D128200103F33 /* VLCEmptyLibraryView.m */,
 				8F91EC77195CEC7900F5BCBA /* VLCOpenInActivity.h */,
@@ -3219,7 +3209,6 @@
 				8DD65170208C89C00052EE68 /* VLCAccessibilityIdentifier.swift in Sources */,
 				DD3EFF551BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserDSM.m in Sources */,
 				7D37849A183A98D1009EE944 /* VLCPlaylistTableViewCell.m in Sources */,
-				7D37849B183A98D1009EE944 /* VLCLibraryViewController.m in Sources */,
 				7D37849E183A98DD009EE944 /* VLCThumbnailsCache.m in Sources */,
 				DD3EFF411BDEBCE500B68579 /* VLCNetworkServerBrowserSharedLibrary.m in Sources */,
 				7D3784A1183A98EB009EE944 /* VLCBugreporter.m in Sources */,
@@ -3266,7 +3255,6 @@
 				41E6BECD207E64E900E158BA /* RemoteNetworkCell.swift in Sources */,
 				DD1CB05A1BBAC549006EDDE6 /* VLCVolumeView.m in Sources */,
 				7D5CAA8C1A4AD8E5003F2CBC /* VLCTrackSelectorHeaderView.m in Sources */,
-				4171D35018A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m in Sources */,
 				DD870E951CEF78D800BBD4FE /* VLCNetworkLoginDataSourceLogin.m in Sources */,
 				7D398DC11CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */,
 				7D30F3CA183AB27A00FFC021 /* VLCDownloadViewController.m in Sources */,