Marino Faggiana il y a 6 ans
Parent
commit
1310539d8b

+ 0 - 54
File Provider Extension/FileProviderExtension+Network.swift

@@ -25,60 +25,6 @@ import FileProvider
 
 extension FileProviderExtension {
 
-    // --------------------------------------------------------------------------------------------
-    //  MARK: - Read folder
-    // --------------------------------------------------------------------------------------------
-    
-    func readFolder(enumeratedItemIdentifier: NSFileProviderItemIdentifier) {
-        
-        var serverUrl: String?
-        var counter = 0
-        
-        if (enumeratedItemIdentifier == .rootContainer) {
-            
-            serverUrl = providerData.homeServerUrl
-            
-        } else {
-            
-            guard let metadata = providerData.getTableMetadataFromItemIdentifier(enumeratedItemIdentifier) else {
-                return
-            }
-            guard let directorySource = NCManageDatabase.sharedInstance.getTableDirectory(predicate: NSPredicate(format: "directoryID == %@", metadata.directoryID)) else {
-                return
-            }
-            
-            serverUrl = directorySource.serverUrl + "/" + metadata.fileName
-        }
-        
-        let ocNetworking = OCnetworking.init(delegate: nil, metadataNet: nil, withUser: providerData.accountUser, withUserID: providerData.accountUserID, withPassword: providerData.accountPassword, withUrl: providerData.accountUrl)
-        ocNetworking?.readFolder(serverUrl, depth: "1", account: providerData.account, success: { (metadatas, metadataFolder, directoryID) in
-            
-            NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "directoryID == %@ AND session == ''", directoryID!), clearDateReadDirectoryID: directoryID!)
-            guard let metadatasUpdate = NCManageDatabase.sharedInstance.addMetadatas(metadatas as! [tableMetadata], serverUrl: serverUrl) else {
-                return
-            }
-            
-            for metadata in metadatasUpdate {
-             
-                let item = FileProviderItem(metadata: metadata, parentItemIdentifier: enumeratedItemIdentifier, providerData: self.providerData)
-             
-                self.providerData.queueTradeSafe.sync(flags: .barrier) {
-                    self.providerData.fileProviderSignalUpdateContainerItem[item.itemIdentifier] = item
-                }
-             
-                counter += 1
-                if counter >= self.providerData.itemForPage {
-                    //self.signalEnumerator(for: [enumeratedItemIdentifier])
-                    counter = 0
-                }
-             }
-             
-            //self.signalEnumerator(for: [enumeratedItemIdentifier])
-            
-        }, failure: { (errorMessage, errorCode) in
-        })
-    }
-    
     // --------------------------------------------------------------------------------------------
     //  MARK: - Delete
     // --------------------------------------------------------------------------------------------

+ 15 - 0
File Provider Extension/FileProviderExtension+Thumbnail.swift

@@ -5,6 +5,21 @@
 //  Created by Marino Faggiana on 28/05/18.
 //  Copyright © 2018 TWS. All rights reserved.
 //
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
 
 import FileProvider
 

+ 4 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -168,6 +168,7 @@
 		F73CCE321DC13798007E38D8 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */; };
 		F73D71621F2673C200E233EB /* NCText.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73D71611F2673C200E233EB /* NCText.swift */; };
 		F73D71641F2674A400E233EB /* NCText.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F73D71631F2674A400E233EB /* NCText.storyboard */; };
+		F73E332820E515CF0054222E /* NCActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73E332720E515CF0054222E /* NCActivity.swift */; };
 		F73F537F1E929C8500F8678D /* CCMore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73F537E1E929C8500F8678D /* CCMore.swift */; };
 		F7434B3420E23FD700417916 /* NCDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7BAADB41ED5A87C00B7EAD4 /* NCDatabase.swift */; };
 		F7434B3620E23FE000417916 /* NCManageDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7BAADB51ED5A87C00B7EAD4 /* NCManageDatabase.swift */; };
@@ -828,6 +829,7 @@
 		F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStore.m; sourceTree = "<group>"; };
 		F73D71611F2673C200E233EB /* NCText.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCText.swift; sourceTree = "<group>"; };
 		F73D71631F2674A400E233EB /* NCText.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCText.storyboard; sourceTree = "<group>"; };
+		F73E332720E515CF0054222E /* NCActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCActivity.swift; sourceTree = "<group>"; };
 		F73F537E1E929C8500F8678D /* CCMore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCMore.swift; sourceTree = "<group>"; };
 		F7434B5F20E2440600417916 /* FileProviderExtension-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FileProviderExtension-Bridging-Header.h"; sourceTree = "<group>"; };
 		F743B2C31C95BBE8006F5B4A /* CCShareInfoCMOC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCShareInfoCMOC.h; sourceTree = "<group>"; };
@@ -2444,6 +2446,7 @@
 		F7A321621E9E37960069AD1B /* Activity */ = {
 			isa = PBXGroup;
 			children = (
+				F73E332720E515CF0054222E /* NCActivity.swift */,
 				F7A321631E9E37960069AD1B /* CCActivity.h */,
 				F7A321641E9E37960069AD1B /* CCActivity.m */,
 			);
@@ -3690,6 +3693,7 @@
 				F762CB081EACB66200B38484 /* XLFormOptionsViewController.m in Sources */,
 				F73CC0721E813DFF006E3047 /* BKPasscodeLockScreenManager.m in Sources */,
 				F73B4F101F470D9100BBEE4B /* nsSBCharSetProber.cpp in Sources */,
+				F73E332820E515CF0054222E /* NCActivity.swift in Sources */,
 				F762CB0E1EACB66200B38484 /* NSExpression+XLFormAdditions.m in Sources */,
 				F73B4F071F470D9100BBEE4B /* nsEscSM.cpp in Sources */,
 				F77B0E221D118A16002130FE /* CCManageLocation.m in Sources */,

+ 28 - 0
iOSClient/Activity/NCActivity.swift

@@ -0,0 +1,28 @@
+//
+//  NCActivity.swift
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 28/06/18.
+//  Copyright © 2018 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+import Foundation
+
+class NCActivity: NSObject {
+
+}