Architecture overhaul for folder code and move out parts to slim down the VLCLibraryViewController
The folder model and representation code should be separated from the view presentation in VLCLibraryController. There is a lot of state to handle the representation and creation of folders, the moving in and out of folders and for reordering within.
This leads to a lot of complexity and state that needs to be maintained like:
- BOOL _inFolder;
- _indexPaths (which are also used for deletion)
- id _folderObject;
After solving the decoupling of MediaModel from the View representation we should move code handling folders out of the LibraryVC as well.
This includes methods like:
- (void)rearrangeFolderTrackNumbersForRemovedItem:(MLFile *) mediaObject
- (void)createFolderWithName:(NSString *)folderName
- (void)collectionView:(UICollectionView *)collectionView requestToMoveItemAtIndexPath:(NSIndexPath *)itemPath intoFolderAtIndexPath:(NSIndexPath *)folderPath