Browse Source

clear code

Marino Faggiana 8 years ago
parent
commit
6fd470e244

+ 9 - 8
Nextcloud.xcodeproj/project.pbxproj

@@ -359,7 +359,7 @@
 		F77B0DFB1D118A16002130FE /* NYXProgressiveImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F04D11C889184008DAB36 /* NYXProgressiveImageView.m */; };
 		F77B0DFF1D118A16002130FE /* OCNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F74D3DBE1BAC1941000BAE4B /* OCNetworking.m */; };
 		F77B0E011D118A16002130FE /* RNCryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F05351C889184008DAB36 /* RNCryptor.m */; };
-		F77B0E021D118A16002130FE /* CCPhotosCameraUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = F719FDB21CF06645004895D0 /* CCPhotosCameraUpload.m */; };
+		F77B0E021D118A16002130FE /* CCPhotos.m in Sources */ = {isa = PBXBuildFile; fileRef = F719FDB21CF06645004895D0 /* CCPhotos.m */; };
 		F77B0E031D118A16002130FE /* CCShareInfoCMOC.m in Sources */ = {isa = PBXBuildFile; fileRef = F743B2C41C95BBE8006F5B4A /* CCShareInfoCMOC.m */; };
 		F77B0E041D118A16002130FE /* UIImage+animatedGIF.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F05581C889184008DAB36 /* UIImage+animatedGIF.m */; };
 		F77B0E071D118A16002130FE /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = F70F0F951C889487008DAB36 /* ioapi.c */; };
@@ -1049,8 +1049,8 @@
 		F7151A821D477A4B00E6AF45 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		F7151A831D477A4B00E6AF45 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Intro.strings; sourceTree = "<group>"; };
 		F7151A841D477A4B00E6AF45 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Error.strings; sourceTree = "<group>"; };
-		F719FDB11CF06645004895D0 /* CCPhotosCameraUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhotosCameraUpload.h; sourceTree = "<group>"; };
-		F719FDB21CF06645004895D0 /* CCPhotosCameraUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPhotosCameraUpload.m; sourceTree = "<group>"; };
+		F719FDB11CF06645004895D0 /* CCPhotos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhotos.h; sourceTree = "<group>"; };
+		F719FDB21CF06645004895D0 /* CCPhotos.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPhotos.m; sourceTree = "<group>"; };
 		F720E01E1E48C73E001A4B9E /* CCActions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = CCActions.swift; path = Actions/CCActions.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
 		F721371D1BAFF0920012B613 /* CCAccountWeb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAccountWeb.h; sourceTree = "<group>"; };
 		F721371E1BAFF0920012B613 /* CCAccountWeb.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCAccountWeb.m; sourceTree = "<group>"; };
@@ -2342,12 +2342,13 @@
 			path = minizip;
 			sourceTree = "<group>";
 		};
-		F719FDAE1CF06645004895D0 /* PhotosCameraUpload */ = {
+		F719FDAE1CF06645004895D0 /* Photos */ = {
 			isa = PBXGroup;
 			children = (
-				F719FDB11CF06645004895D0 /* CCPhotosCameraUpload.h */,
-				F719FDB21CF06645004895D0 /* CCPhotosCameraUpload.m */,
+				F719FDB11CF06645004895D0 /* CCPhotos.h */,
+				F719FDB21CF06645004895D0 /* CCPhotos.m */,
 			);
+			name = Photos;
 			path = PhotosCameraUpload;
 			sourceTree = "<group>";
 		};
@@ -3598,7 +3599,7 @@
 				F74D3DB81BAC1941000BAE4B /* Networking */,
 				F7C5259A1E3B441D00FFE02C /* Notification */,
 				F7FCFFD51D70798C000E6E29 /* PeekPop */,
-				F719FDAE1CF06645004895D0 /* PhotosCameraUpload */,
+				F719FDAE1CF06645004895D0 /* Photos */,
 				F7BE6E2A1D2D5C3B00106933 /* QuickActions */,
 				F7FE125B1BAC03FB0041924B /* Security */,
 				F7ACE4281BAC0268006C0017 /* Settings */,
@@ -4397,7 +4398,7 @@
 				F77B0DFF1D118A16002130FE /* OCNetworking.m in Sources */,
 				F77B0E011D118A16002130FE /* RNCryptor.m in Sources */,
 				F70022DA1EC4C9100080073F /* OCHTTPRequestOperation.m in Sources */,
-				F77B0E021D118A16002130FE /* CCPhotosCameraUpload.m in Sources */,
+				F77B0E021D118A16002130FE /* CCPhotos.m in Sources */,
 				F70022A11EC4C9100080073F /* AFHTTPSessionManager.m in Sources */,
 				F762CB041EACB66200B38484 /* XLFormSwitchCell.m in Sources */,
 				F77B0E031D118A16002130FE /* CCShareInfoCMOC.m in Sources */,

+ 2 - 2
iOSClient/AppDelegate.h

@@ -36,7 +36,7 @@
 #import "CCDetail.h"
 #import "CCQuickActions.h"
 #import "CCMain.h"
-#import "CCPhotosCameraUpload.h"
+#import "CCPhotos.h"
 #import "CCTransfers.h"
 #import "CCSettings.h"
 
@@ -119,7 +119,7 @@
 
 @property (nonatomic, strong) CCMain *activeMain;
 @property (nonatomic, strong) CCMain *homeMain;
-@property (nonatomic, strong) CCPhotosCameraUpload *activePhotosCameraUpload;
+@property (nonatomic, strong) CCPhotos *activePhotos;
 @property (nonatomic, retain) CCDetail *activeDetail;
 @property (nonatomic, retain) CCSettings *activeSettings;
 @property (nonatomic, retain) CCActivity *activeActivity;

+ 4 - 4
iOSClient/AppDelegate.m

@@ -31,7 +31,7 @@
 #import "CCCrypto.h"
 #import "CCManageAsset.h"
 #import "CCGraphics.h"
-#import "CCPhotosCameraUpload.h"
+#import "CCPhotos.h"
 #import "CCSynchronize.h"
 #import "CCMain.h"
 #import "CCDetail.h"
@@ -352,14 +352,14 @@
             [_activeMain requestServerCapabilities];
     
         NSLog(@"[LOG] Initialize Camera Upload");
-        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initStateCameraUpload" object:nil];
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initStateAutoUpload" object:nil];
         
         NSLog(@"[LOG] Listning Favorites");
         [[CCSynchronize sharedSynchronize] readListingFavorites];        
     });
     
     // Initialize Camera Upload
-    //[[NSNotificationCenter defaultCenter] postNotificationName:@"initStateCameraUpload" object:@{@"afterDelay": @(2)}];
+    //[[NSNotificationCenter defaultCenter] postNotificationName:@"initStateAutoUpload" object:@{@"afterDelay": @(2)}];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -1203,7 +1203,7 @@
     NSLog(@"[LOG] Start Fetch");
     
     // Verify new photo
-    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initStateCameraUpload" object:nil];
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initStateAutoUpload" object:nil];
     
     // after 20 sec verify Re
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 20 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

+ 7 - 5
iOSClient/Brand/Main.storyboard

@@ -48,7 +48,7 @@
                     <navigationItem key="navigationItem" id="1CO-Ie-Aaj"/>
                     <connections>
                         <segue destination="eZl-ut-xpC" kind="presentation" identifier="AcknowledgementsSegue" modalPresentationStyle="formSheet" id="J9C-Ex-Q6i"/>
-                        <segue destination="DEi-yz-wEj" kind="show" identifier="CCManageCameraUploadSegue" id="Aij-5E-cNN"/>
+                        <segue destination="DEi-yz-wEj" kind="show" identifier="CCManageAutoUploadSegue" id="Aij-5E-cNN"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="wVn-RD-GD2" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -213,11 +213,11 @@
             </objects>
             <point key="canvasLocation" x="9212" y="1217.5412293853074"/>
         </scene>
-        <!--Photos Camera Upload-->
+        <!--Photos-->
         <scene sceneID="kWr-RF-gdq">
             <objects>
-                <collectionViewController extendedLayoutIncludesOpaqueBars="YES" id="1Ca-6H-d29" customClass="CCPhotosCameraUpload" sceneMemberID="viewController">
-                    <collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="zkC-IW-U7O">
+                <collectionViewController extendedLayoutIncludesOpaqueBars="YES" id="1Ca-6H-d29" customClass="CCPhotos" sceneMemberID="viewController">
+                    <collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" dataMode="prototypes" id="zkC-IW-U7O">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -311,6 +311,8 @@
                         </connections>
                     </collectionView>
                     <navigationItem key="navigationItem" id="Ljh-k8-LVi"/>
+                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+                    <size key="freeformSize" width="375" height="667"/>
                     <connections>
                         <segue destination="mtc-lf-PRo" kind="showDetail" identifier="segueDetail" id="op6-ow-K8v"/>
                     </connections>
@@ -838,6 +840,6 @@
         <image name="tabBarPlus" width="40" height="40"/>
     </resources>
     <inferredMetricsTieBreakers>
-        <segue reference="1IV-5w-SfJ"/>
+        <segue reference="op6-ow-K8v"/>
     </inferredMetricsTieBreakers>
 </document>

+ 4 - 4
iOSClient/Brand/NCBrand.swift

@@ -72,10 +72,10 @@ class NCBrandOptions: NSObject {
     public let pushNotificationServer:          String = "https://push-notifications.nextcloud.com"
     public let loginButtonLabelLink:            String = "https://nextcloud.com/providers"
     public let webLoginAutenticationProtocol:   String = ""
-    public let folderBrandCameraUpload:         String = ""
+    public let folderBrandAutoUpload:           String = ""
 
     // Auto Upload default folder
-    public var folderDefaultCameraUpload:       String = "Photos"
+    public var folderDefaultAutoUpload:         String = "Photos"
     
     // Capabilities Group
     public let capabilitiesGroups:              String = "group.it.twsweb.Crypto-Cloud"
@@ -99,9 +99,9 @@ class NCBrandOptions: NSObject {
     
     override init() {
         
-        if folderBrandCameraUpload != "" {
+        if folderBrandAutoUpload != "" {
             
-            self.folderDefaultCameraUpload = self.folderBrandCameraUpload
+            self.folderDefaultAutoUpload = self.folderBrandAutoUpload
         }
     }
 }

+ 6 - 6
iOSClient/Database/NCManageDatabase.swift

@@ -210,7 +210,7 @@ class NCManageDatabase: NSObject {
                 
             } else {
                 
-                return NCBrandOptions.sharedInstance.folderDefaultCameraUpload
+                return NCBrandOptions.sharedInstance.folderDefaultAutoUpload
             }
         }
         
@@ -1531,7 +1531,7 @@ class NCManageDatabase: NSObject {
         return self.getMetadatas(predicate: predicate, sorted: nil, ascending: false)
     }
     
-    func getTableMetadatasPhotosCameraUpload(serverUrl: String) -> [tableMetadata]? {
+    func getTableMetadatasPhotos(serverUrl: String) -> [tableMetadata]? {
         
         let tableAccount = self.getAccountActive()
         if tableAccount == nil {
@@ -1542,7 +1542,7 @@ class NCManageDatabase: NSObject {
         let sorted = CCUtility.getOrderSettings()
         let ascending = CCUtility.getAscendingSettings()
         
-        var recordsPhotosCameraUpload = [tableMetadata]()
+        var recordsPhotosAutoUpload = [tableMetadata]()
         let directories = self.getTablesDirectory(predicate: NSPredicate(format: "account = %@ AND serverUrl BEGINSWITH %@", tableAccount!.account, serverUrl), sorted: "serverUrl", ascending: true)
         
         if directories != nil {
@@ -1555,15 +1555,15 @@ class NCManageDatabase: NSObject {
                 if metadatas.count > 0 {
                     
                     for metadata in metadatas {
-                        recordsPhotosCameraUpload.append(tableMetadata.init(value: metadata))
+                        recordsPhotosAutoUpload.append(tableMetadata.init(value: metadata))
                     }
                 }
             }
         }
         
-        if recordsPhotosCameraUpload.count > 0 {
+        if recordsPhotosAutoUpload.count > 0 {
             
-            return Array(recordsPhotosCameraUpload)
+            return Array(recordsPhotosAutoUpload)
             
         } else {
             

+ 0 - 1
iOSClient/Favorites/CCFavorites.m

@@ -702,7 +702,6 @@
     
     _detailViewController.metadataDetail = _metadata;
     _detailViewController.dateFilterQuery = nil;
-    _detailViewController.isCameraUpload = NO;
     _detailViewController.dataSourceImagesVideos = allRecordsDataSourceImagesVideos;
     
     [_detailViewController setTitle:_metadata.fileNamePrint];

+ 0 - 1
iOSClient/Local storage/CCLocalStorage.m

@@ -474,7 +474,6 @@
     _detailViewController.sourceDirectoryLocal = YES;
     _detailViewController.metadataDetail = _metadata;
     _detailViewController.dateFilterQuery = nil;
-    _detailViewController.isCameraUpload = NO;
     _detailViewController.dataSourceImagesVideos = allRecordsDataSourceImagesVideos;
 
     [_detailViewController setTitle:_metadata.fileNamePrint];

+ 1 - 1
iOSClient/Main/CCDetail.h

@@ -39,7 +39,7 @@
 
 @property (nonatomic, strong) tableMetadata *metadataDetail;
 @property BOOL sourceDirectoryLocal;
-@property BOOL isCameraUpload;
+//@property BOOL isAutoUpload;
 @property (nonatomic, strong) NSDate *dateFilterQuery;
 
 // Document

+ 1 - 1
iOSClient/Main/CCMain.h

@@ -77,7 +77,7 @@
 - (void)closeAllMenu;
 - (void)returnCreate:(NSInteger)type;
 
-- (void)createFolderCameraUpload;
+- (void)createFolderAutoUpload;
 - (void)createFolder:(NSString *)fileNameFolder autoUploadDirectory:(BOOL)autoUploadDirectory;
 - (void)readFolderWithForced:(BOOL)forced serverUrl:(NSString *)serverUrl;
 

+ 11 - 12
iOSClient/Main/CCMain.m

@@ -23,7 +23,7 @@
 
 #import "CCMain.h"
 #import "AppDelegate.h"
-#import "CCPhotosCameraUpload.h"
+#import "CCPhotos.h"
 #import "CCSynchronize.h"
 #import "CCTransfersCell.h"
 #import "OCActivity.h"
@@ -372,8 +372,8 @@
         [self readFolderWithForced:NO serverUrl:_serverUrl];
         
         // Load photo datasorce
-        if (app.activePhotosCameraUpload)
-            [app.activePhotosCameraUpload reloadDatasourceForced];
+        if (app.activePhotos)
+            [app.activePhotos reloadDatasourceForced];
         
         // remove all of detail
         if (app.activeDetail)
@@ -1361,8 +1361,8 @@
                 [app.activeDetail downloadPhotoBrowserFailure:errorCode];
             
             // Updating Photos
-            if (app.activePhotosCameraUpload)
-                [app.activePhotosCameraUpload downloadFileFailure:errorCode];
+            if (app.activePhotos)
+                [app.activePhotos downloadFileFailure:errorCode];
         });
         
     } else {
@@ -1554,8 +1554,8 @@
                 [app.activeDetail downloadPhotoBrowserSuccess:metadata selector:selector];
             
             // Photos
-            if (app.activePhotosCameraUpload)
-                [app.activePhotosCameraUpload downloadFileSuccess:metadata];
+            if (app.activePhotos)
+                [app.activePhotos downloadFileSuccess:metadata];
         });
 
         [self reloadDatasource:serverUrl fileID:metadata.fileID selector:selector];
@@ -2427,7 +2427,7 @@
     
     metadataNet.action = actionCreateFolder;
     if (autoUploadDirectory)
-        metadataNet.options = @"folderCameraUpload";
+        metadataNet.options = @"folderAutoUpload";
     metadataNet.fileName = fileNameFolder;
     metadataNet.selector = selectorCreateFolder;
     metadataNet.selectorPost = selectorReadFolderForced;
@@ -2475,7 +2475,7 @@
     [_hud visibleHudTitle:NSLocalizedString(@"_create_folder_", nil) mode:MBProgressHUDModeIndeterminate color:nil];
 }
 
-- (void)createFolderCameraUpload
+- (void)createFolderAutoUpload
 {
     NSString *autoUploadFileName = [[NCManageDatabase sharedInstance] getAccountAutoUploadFileName];
 
@@ -4258,8 +4258,8 @@
                                         
                                         [[NCManageDatabase sharedInstance] clearDateReadWithServerUrl:oldAutoUploadDirectory directoryID:nil];
                                         
-                                        if (app.activeAccount.length > 0 && app.activePhotosCameraUpload)
-                                            [app.activePhotosCameraUpload reloadDatasourceForced];
+                                        if (app.activeAccount.length > 0 && app.activePhotos)
+                                            [app.activePhotos reloadDatasourceForced];
                                         
                                         [self readFolderWithForced:YES serverUrl:serverUrl];
                                         
@@ -5559,7 +5559,6 @@
     _detailViewController.metadataDetail = metadata;
     _detailViewController.dataSourceImagesVideos = allRecordsDataSourceImagesVideos;
     _detailViewController.dateFilterQuery = nil;
-    _detailViewController.isCameraUpload = NO;
     
     [_detailViewController setTitle:metadata.fileNamePrint];
 }

+ 0 - 1
iOSClient/Networking/CCNetworking.h

@@ -75,7 +75,6 @@
 @protocol CCNetworkingDelegate <NSObject>
 
 @optional - (void)reloadDatasource:(NSString *)serverUrl fileID:(NSString *)fileID selector:(NSString *)selector;
-@optional - (void)comandoCreaCartella:(NSString *)fileNameFolder cameraUpload:(BOOL)cameraUpload;
 
 @optional - (void)downloadTaskSave:(NSURLSessionDownloadTask *)downloadTask;
 @optional - (void)downloadFileSuccess:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost;

+ 2 - 3
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.h → iOSClient/PhotosCameraUpload/CCPhotos.h

@@ -1,5 +1,5 @@
 //
-//  CCPhotosCameraUpload.h
+//  CCPhotos.h
 //  Crypto Cloud Technology Nextcloud
 //
 //  Created by Marino Faggiana on 29/07/15.
@@ -40,7 +40,7 @@
 
 @class tableMetadata;
 
-@interface CCPhotosCameraUpload : UICollectionViewController <UICollectionViewDataSource, UICollectionViewDelegate, UIActionSheetDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate, CCManageLocationDelegate, PHPhotoLibraryChangeObserver, OCNetworkingDelegate>
+@interface CCPhotos: UICollectionViewController <UICollectionViewDataSource, UICollectionViewDelegate, UIActionSheetDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate, CCManageLocationDelegate, PHPhotoLibraryChangeObserver, OCNetworkingDelegate>
 
 @property (nonatomic, weak) CCDetail *detailViewController;
 @property (nonatomic, strong) PHFetchResult *assetsFetchResult;
@@ -51,6 +51,5 @@
 - (void)downloadFileFailure:(NSInteger)errorCode;
 
 - (void)reloadDatasourceForced;
-//- (BOOL)automaticCreateFolder:(NSString *)folderPathName;
 
 @end

+ 16 - 17
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m → iOSClient/PhotosCameraUpload/CCPhotos.m

@@ -1,5 +1,5 @@
 //
-//  CCPhotosCameraUpload.m
+//  CCPhotos.m
 //  Crypto Cloud Technology Nextcloud
 //
 //  Created by Marino Faggiana on 29/07/15.
@@ -21,11 +21,11 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //
 
-#import "CCPhotosCameraUpload.h"
+#import "CCPhotos.h"
 #import "AppDelegate.h"
 #import "NCBridgeSwift.h"
 
-@interface CCPhotosCameraUpload () <CCActionsDeleteDelegate, CCActionsDownloadThumbnailDelegate>
+@interface CCPhotos () <CCActionsDeleteDelegate, CCActionsDownloadThumbnailDelegate>
 {
     tableMetadata *_metadata;
 
@@ -40,7 +40,7 @@
 }
 @end
 
-@implementation CCPhotosCameraUpload
+@implementation CCPhotos
 
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Init =====
@@ -50,12 +50,12 @@
 {
     if (self = [super initWithCoder:aDecoder])  {
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initStateCameraUpload:) name:@"initStateCameraUpload" object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupCameraUploadFull) name:@"setupCameraUploadFull" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initStateAutoUpload:) name:@"initStateAutoUpload" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupAutoUploadFull) name:@"setupAutoUploadFull" object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(triggerProgressTask:) name:@"NotificationProgressTask" object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
         
-        app.activePhotosCameraUpload = self;
+        app.activePhotos = self;
     }
     
     return self;
@@ -531,7 +531,7 @@
         
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
             
-            NSArray *metadatas = [[NCManageDatabase sharedInstance] getTableMetadatasPhotosCameraUploadWithServerUrl:serverUrl];
+            NSArray *metadatas = [[NCManageDatabase sharedInstance] getTableMetadatasPhotosWithServerUrl:serverUrl];
             
             _sectionDataSource = [CCSectionMetadata creataDataSourseSectionMetadata:metadatas listProgressMetadata:nil groupByField:@"date" replaceDateToExifDate:YES activeAccount:app.activeAccount];
             
@@ -542,7 +542,7 @@
 
     } else {
         
-        NSArray *results = [[NCManageDatabase sharedInstance] getTableMetadatasPhotosCameraUploadWithServerUrl:serverUrl];
+        NSArray *results = [[NCManageDatabase sharedInstance] getTableMetadatasPhotosWithServerUrl:serverUrl];
         
         _sectionDataSource = [CCSectionMetadata creataDataSourseSectionMetadata:results listProgressMetadata:nil groupByField:@"date" replaceDateToExifDate:YES activeAccount:app.activeAccount];
         [self reloadCollection];
@@ -747,32 +747,31 @@
     self.detailViewController.dataSourceImagesVideos = allRecordsDataSourceImagesVideos;
     self.detailViewController.metadataDetail = _metadata;
     self.detailViewController.dateFilterQuery = _metadata.date;
-    self.detailViewController.isCameraUpload = YES;
     
     [self.detailViewController setTitle:_metadata.fileNamePrint];
 }
 
 #pragma --------------------------------------------------------------------------------------------
-#pragma mark === initStateCameraUpload ===
+#pragma mark === initStateAutoUpload ===
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)initStateCameraUpload:(NSNotification *)notification
+- (void)initStateAutoUpload:(NSNotification *)notification
 {
     int afterDelay = 0;
     
     if (notification.object)
         afterDelay = [[notification.object objectForKey:@"afterDelay"] intValue];
     
-    [self performSelector:@selector(initStateCameraUpload) withObject:nil afterDelay:afterDelay];
+    [self performSelector:@selector(initStateAutoUpload) withObject:nil afterDelay:afterDelay];
 }
 
-- (void)initStateCameraUpload
+- (void)initStateAutoUpload
 {
     tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
 
     if (tableAccount.autoUpload) {
         
-        [self setupCameraUpload];
+        [self setupAutoUpload];
         
         if (tableAccount.autoUploadBackground)
             [self checkIfLocationIsEnabled];
@@ -791,7 +790,7 @@
 #pragma mark === Camera Upload & Full ===
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)setupCameraUpload
+- (void)setupAutoUpload
 {
     if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusAuthorized) {
         
@@ -818,7 +817,7 @@
     }
 }
 
-- (void)setupCameraUploadFull
+- (void)setupAutoUploadFull
 {
     if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusAuthorized) {
         

+ 1 - 1
iOSClient/Settings/CCManageAutoUpload.h

@@ -24,7 +24,7 @@
 #import "XLFormViewController.h"
 #import "CCMain.h"
 #import "CCManageLocation.h"
-#import "CCPhotosCameraUpload.h"
+#import "CCPhotos.h"
 
 @interface CCManageAutoUpload : XLFormViewController
 

+ 5 - 5
iOSClient/Settings/CCManageAutoUpload.m

@@ -207,7 +207,7 @@
                         
             // Create Folder
             if (app.activeMain)
-                [app.activeMain createFolderCameraUpload];
+                [app.activeMain createFolderAutoUpload];
             
             [[NCManageDatabase sharedInstance] setAccountAutoUploadFiled:@"autoUpload" state:YES];
             
@@ -238,7 +238,7 @@
         }
         
         // Initialize Auto Upload
-        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initStateCameraUpload" object:nil];
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initStateAutoUpload" object:nil];
         
         [self reloadForm];
     }
@@ -249,8 +249,8 @@
             
             BOOL isLocationIsEnabled = NO;
                 
-            if (app.activePhotosCameraUpload)
-                [app.activePhotosCameraUpload checkIfLocationIsEnabled];
+            if (app.activePhotos)
+                [app.activePhotos checkIfLocationIsEnabled];
                 
             if(isLocationIsEnabled == YES) {
                     
@@ -275,7 +275,7 @@
         
         if ([[rowDescriptor.value valueData] boolValue] == YES) {
             
-            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"setupCameraUploadFull" object:nil];
+            [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"setupAutoUploadFull" object:nil];
             [[NCManageDatabase sharedInstance] setAccountAutoUploadFiled:@"autoUploadFull" state:YES];
             
         } else {

+ 2 - 2
iOSClient/Settings/CCSettings.m

@@ -66,10 +66,10 @@
     section = [XLFormSectionDescriptor formSection];
     [form addFormSection:section];
     
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"cameraupload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_uploading_from_camera_", nil)];
+    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_uploading_from_camera_", nil)];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
     [row.cellConfig setObject:[UIImage imageNamed:@"settingsCameraUpload"] forKey:@"imageView.image"];
-    row.action.formSegueIdentifier = @"CCManageCameraUploadSegue";
+    row.action.formSegueIdentifier = @"CCManageAutoUploadSegue";
     [section addFormRow:row];
 
     // Section FOLDERS FAVORITES OFFLINE ------------------------------------