浏览代码

Merge branch 'fix/activities' of https://github.com/nextcloud/ios into fix/activities

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 年之前
父节点
当前提交
b3f92b849f
共有 92 个文件被更改,包括 164 次插入50 次删除
  1. 1 0
      .gitignore
  2. 25 0
      Nextcloud.xcodeproj/project.pbxproj
  3. 57 12
      Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  4. 38 10
      Share/NCShareExtension.swift
  5. 4 0
      iOSClient/AppDelegate.swift
  6. 2 2
      iOSClient/Main/Create cloud/NCCreateFormUploadConflictCell.xib
  7. 25 17
      iOSClient/Main/NCFunctionCenter.swift
  8. 3 3
      iOSClient/Settings/Acknowledgements.rtf
  9. 3 3
      iOSClient/Share/NCShare.storyboard
  10. 3 2
      iOSClient/Share/NCSharePaging.swift
  11. 3 1
      iOSClient/Shares/NCShares.swift
  12. 二进制
      iOSClient/Supporting Files/af.lproj/Localizable.strings
  13. 二进制
      iOSClient/Supporting Files/ar.lproj/Localizable.strings
  14. 二进制
      iOSClient/Supporting Files/ast.lproj/Localizable.strings
  15. 二进制
      iOSClient/Supporting Files/az.lproj/Localizable.strings
  16. 二进制
      iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings
  17. 二进制
      iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings
  18. 二进制
      iOSClient/Supporting Files/br.lproj/Localizable.strings
  19. 二进制
      iOSClient/Supporting Files/bs.lproj/Localizable.strings
  20. 二进制
      iOSClient/Supporting Files/ca.lproj/Localizable.strings
  21. 二进制
      iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
  22. 二进制
      iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings
  23. 二进制
      iOSClient/Supporting Files/da.lproj/Localizable.strings
  24. 二进制
      iOSClient/Supporting Files/de.lproj/Localizable.strings
  25. 二进制
      iOSClient/Supporting Files/el.lproj/Localizable.strings
  26. 二进制
      iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
  27. 二进制
      iOSClient/Supporting Files/eo.lproj/Localizable.strings
  28. 二进制
      iOSClient/Supporting Files/es-419.lproj/Localizable.strings
  29. 二进制
      iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
  30. 二进制
      iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
  31. 二进制
      iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
  32. 二进制
      iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
  33. 二进制
      iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
  34. 二进制
      iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
  35. 二进制
      iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
  36. 二进制
      iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
  37. 二进制
      iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
  38. 二进制
      iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
  39. 二进制
      iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
  40. 二进制
      iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
  41. 二进制
      iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
  42. 二进制
      iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
  43. 二进制
      iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
  44. 二进制
      iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
  45. 二进制
      iOSClient/Supporting Files/es.lproj/Localizable.strings
  46. 二进制
      iOSClient/Supporting Files/et_EE.lproj/Localizable.strings
  47. 二进制
      iOSClient/Supporting Files/eu.lproj/Localizable.strings
  48. 二进制
      iOSClient/Supporting Files/fa.lproj/Localizable.strings
  49. 二进制
      iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
  50. 二进制
      iOSClient/Supporting Files/fr.lproj/Localizable.strings
  51. 二进制
      iOSClient/Supporting Files/gl.lproj/Localizable.strings
  52. 二进制
      iOSClient/Supporting Files/he.lproj/Localizable.strings
  53. 二进制
      iOSClient/Supporting Files/hr.lproj/Localizable.strings
  54. 二进制
      iOSClient/Supporting Files/hu.lproj/Localizable.strings
  55. 二进制
      iOSClient/Supporting Files/ia.lproj/Localizable.strings
  56. 二进制
      iOSClient/Supporting Files/id.lproj/Localizable.strings
  57. 二进制
      iOSClient/Supporting Files/is.lproj/Localizable.strings
  58. 二进制
      iOSClient/Supporting Files/it.lproj/Localizable.strings
  59. 二进制
      iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
  60. 二进制
      iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
  61. 二进制
      iOSClient/Supporting Files/km.lproj/Localizable.strings
  62. 二进制
      iOSClient/Supporting Files/ko.lproj/Localizable.strings
  63. 二进制
      iOSClient/Supporting Files/lb.lproj/Localizable.strings
  64. 二进制
      iOSClient/Supporting Files/lo.lproj/Localizable.strings
  65. 二进制
      iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
  66. 二进制
      iOSClient/Supporting Files/lv.lproj/Localizable.strings
  67. 二进制
      iOSClient/Supporting Files/mk.lproj/Localizable.strings
  68. 二进制
      iOSClient/Supporting Files/mn.lproj/Localizable.strings
  69. 二进制
      iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
  70. 二进制
      iOSClient/Supporting Files/nl.lproj/Localizable.strings
  71. 二进制
      iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings
  72. 二进制
      iOSClient/Supporting Files/oc.lproj/Localizable.strings
  73. 二进制
      iOSClient/Supporting Files/pl.lproj/Localizable.strings
  74. 二进制
      iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
  75. 二进制
      iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
  76. 二进制
      iOSClient/Supporting Files/ro.lproj/Localizable.strings
  77. 二进制
      iOSClient/Supporting Files/ru.lproj/Localizable.strings
  78. 二进制
      iOSClient/Supporting Files/sc.lproj/Localizable.strings
  79. 二进制
      iOSClient/Supporting Files/si.lproj/Localizable.strings
  80. 二进制
      iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
  81. 二进制
      iOSClient/Supporting Files/sl.lproj/Localizable.strings
  82. 二进制
      iOSClient/Supporting Files/sq.lproj/Localizable.strings
  83. 二进制
      iOSClient/Supporting Files/sr.lproj/Localizable.strings
  84. 二进制
      iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings
  85. 二进制
      iOSClient/Supporting Files/sv.lproj/Localizable.strings
  86. 二进制
      iOSClient/Supporting Files/th_TH.lproj/Localizable.strings
  87. 二进制
      iOSClient/Supporting Files/tr.lproj/Localizable.strings
  88. 二进制
      iOSClient/Supporting Files/uk.lproj/Localizable.strings
  89. 二进制
      iOSClient/Supporting Files/vi.lproj/Localizable.strings
  90. 二进制
      iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
  91. 二进制
      iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
  92. 二进制
      iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings

+ 1 - 0
.gitignore

@@ -41,5 +41,6 @@ Package.resolved
 Cartfile.resolved
 
 ### SwiftPackageManager ###
+.swiftpm
 Package.resolved
 

+ 25 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -117,6 +117,7 @@
 		F72D7EB7263B1207000B3DFC /* MarkdownKit in Frameworks */ = {isa = PBXBuildFile; productRef = F72D7EB6263B1207000B3DFC /* MarkdownKit */; };
 		F72DA9B425F53E4E00B87DB1 /* SwiftRichString in Frameworks */ = {isa = PBXBuildFile; productRef = F72DA9B325F53E4E00B87DB1 /* SwiftRichString */; };
 		F733598125C1C188002ABA72 /* NCAskAuthorization.swift in Sources */ = {isa = PBXBuildFile; fileRef = F733598025C1C188002ABA72 /* NCAskAuthorization.swift */; };
+		F73521B527396D2900919197 /* IHProgressHUD in Frameworks */ = {isa = PBXBuildFile; productRef = F73521B427396D2900919197 /* IHProgressHUD */; };
 		F7362A1F220C853A005101B5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7362A1E220C853A005101B5 /* LaunchScreen.storyboard */; };
 		F7381EE1218218C9000B1560 /* NCOffline.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7381EDA218218C9000B1560 /* NCOffline.swift */; };
 		F7381EE5218218C9000B1560 /* NCOffline.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7381EDE218218C9000B1560 /* NCOffline.storyboard */; };
@@ -342,6 +343,7 @@
 		F7EFC0C6256BC77700461AAD /* NCMoreUserCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EFC0C5256BC77700461AAD /* NCMoreUserCell.xib */; };
 		F7EFC0CD256BF8DD00461AAD /* NCUserStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EFC0CC256BF8DD00461AAD /* NCUserStatus.swift */; };
 		F7F1E54C2492369A00E42386 /* NCMediaCommandView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7F1E54B2492369A00E42386 /* NCMediaCommandView.xib */; };
+		F7F5488F273995CE0067475B /* IHProgressHUD in Frameworks */ = {isa = PBXBuildFile; productRef = F7F5488E273995CE0067475B /* IHProgressHUD */; };
 		F7F5CE252707089C007ED1CD /* Parchment in Frameworks */ = {isa = PBXBuildFile; productRef = F7F5CE242707089C007ED1CD /* Parchment */; };
 		F7F878AE1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */; };
 		F7F878AF1FB9E3B900599E4F /* NCEndToEndMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F878AD1FB9E3B900599E4F /* NCEndToEndMetadata.swift */; };
@@ -793,6 +795,7 @@
 				F73ADD2126554F8E0069EA0D /* SwiftEntryKit in Frameworks */,
 				F75E57BF25BF0EC8002B72C2 /* SVGKit in Frameworks */,
 				F782A585251236B7007BBABD /* RealmSwift in Frameworks */,
+				F7F5488F273995CE0067475B /* IHProgressHUD in Frameworks */,
 				F786D593253454CE00E3DD7B /* NCCommunication in Frameworks */,
 				F782A583251236B7007BBABD /* Realm in Frameworks */,
 				F72D7EB7263B1207000B3DFC /* MarkdownKit in Frameworks */,
@@ -832,6 +835,7 @@
 				F70B86992642CF5800ED5349 /* FSCalendar.xcframework in Frameworks */,
 				F70B86762642CF5300ED5349 /* ChromaColorPicker.xcframework in Frameworks */,
 				F75EAED826D2552E00F4320E /* MarqueeLabel in Frameworks */,
+				F73521B527396D2900919197 /* IHProgressHUD in Frameworks */,
 				F72DA9B425F53E4E00B87DB1 /* SwiftRichString in Frameworks */,
 				F7F5CE252707089C007ED1CD /* Parchment in Frameworks */,
 				F70B86932642CF5700ED5349 /* OpenSSL.xcframework in Frameworks */,
@@ -1697,6 +1701,7 @@
 				F75E57BE25BF0EC8002B72C2 /* SVGKit */,
 				F72D7EB6263B1207000B3DFC /* MarkdownKit */,
 				F73ADD2026554F8E0069EA0D /* SwiftEntryKit */,
+				F7F5488E273995CE0067475B /* IHProgressHUD */,
 			);
 			productName = "Share Ext";
 			productReference = F7CE8AFB1DC1F8D8009CAE48 /* Share.appex */;
@@ -1758,6 +1763,7 @@
 				F73ADD1B265546890069EA0D /* SwiftEntryKit */,
 				F75EAED726D2552E00F4320E /* MarqueeLabel */,
 				F7F5CE242707089C007ED1CD /* Parchment */,
+				F73521B427396D2900919197 /* IHProgressHUD */,
 			);
 			productName = "Crypto Cloud";
 			productReference = F7CE8AFA1DC1F8D8009CAE48 /* Nextcloud.app */;
@@ -1873,6 +1879,7 @@
 				F73ADD1A265546880069EA0D /* XCRemoteSwiftPackageReference "SwiftEntryKit" */,
 				F75EAED626D2552E00F4320E /* XCRemoteSwiftPackageReference "MarqueeLabel" */,
 				F7F5CE232707089B007ED1CD /* XCRemoteSwiftPackageReference "Parchment" */,
+				F73521B327396D2800919197 /* XCRemoteSwiftPackageReference "IHProgressHUD" */,
 			);
 			productRefGroup = F7F67B9F1A24D27800EE80DA;
 			projectDirPath = "";
@@ -2905,6 +2912,14 @@
 				minimumVersion = 3.7.2;
 			};
 		};
+		F73521B327396D2800919197 /* XCRemoteSwiftPackageReference "IHProgressHUD" */ = {
+			isa = XCRemoteSwiftPackageReference;
+			repositoryURL = "https://github.com/marinofaggiana/IHProgressHUD";
+			requirement = {
+				branch = master;
+				kind = branch;
+			};
+		};
 		F73ADD1A265546880069EA0D /* XCRemoteSwiftPackageReference "SwiftEntryKit" */ = {
 			isa = XCRemoteSwiftPackageReference;
 			repositoryURL = "https://github.com/huri000/SwiftEntryKit";
@@ -2995,6 +3010,11 @@
 			package = F72DA9B225F53E4E00B87DB1 /* XCRemoteSwiftPackageReference "SwiftRichString" */;
 			productName = SwiftRichString;
 		};
+		F73521B427396D2900919197 /* IHProgressHUD */ = {
+			isa = XCSwiftPackageProductDependency;
+			package = F73521B327396D2800919197 /* XCRemoteSwiftPackageReference "IHProgressHUD" */;
+			productName = IHProgressHUD;
+		};
 		F73ADD1B265546890069EA0D /* SwiftEntryKit */ = {
 			isa = XCSwiftPackageProductDependency;
 			package = F73ADD1A265546880069EA0D /* XCRemoteSwiftPackageReference "SwiftEntryKit" */;
@@ -3110,6 +3130,11 @@
 			package = F7ED547A25EEA65400956C55 /* XCRemoteSwiftPackageReference "QRCodeReader" */;
 			productName = QRCodeReader;
 		};
+		F7F5488E273995CE0067475B /* IHProgressHUD */ = {
+			isa = XCSwiftPackageProductDependency;
+			package = F73521B327396D2800919197 /* XCRemoteSwiftPackageReference "IHProgressHUD" */;
+			productName = IHProgressHUD;
+		};
 		F7F5CE242707089C007ED1CD /* Parchment */ = {
 			isa = XCSwiftPackageProductDependency;
 			package = F7F5CE232707089B007ED1CD /* XCRemoteSwiftPackageReference "Parchment" */;

+ 57 - 12
Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -10,6 +10,15 @@
           "version": "0.20200225.4"
         }
       },
+      {
+        "package": "Alamofire",
+        "repositoryURL": "https://github.com/Alamofire/Alamofire",
+        "state": {
+          "branch": null,
+          "revision": "d120af1e8638c7da36c8481fd61a66c0c08dc4fc",
+          "version": "5.4.4"
+        }
+      },
       {
         "package": "BoringSSL-GRPC",
         "repositoryURL": "https://github.com/firebase/boringssl-SwiftPM.git",
@@ -33,8 +42,8 @@
         "repositoryURL": "https://github.com/firebase/firebase-ios-sdk",
         "state": {
           "branch": null,
-          "revision": "81b568348ab4e113dd8bcef5a83c5dd431741ae4",
-          "version": "8.8.1"
+          "revision": "839cc6b0cd80b0b8bf81fe9bd82b743b25dc6446",
+          "version": "8.9.1"
         }
       },
       {
@@ -51,8 +60,8 @@
         "repositoryURL": "https://github.com/google/GoogleAppMeasurement.git",
         "state": {
           "branch": null,
-          "revision": "06add56b27b88ae5180e92d4ee21a1199ee888a1",
-          "version": "8.8.0"
+          "revision": "9b2f6aca5b4685c45f9f5481f19bee8e7982c538",
+          "version": "8.9.1"
         }
       },
       {
@@ -60,8 +69,8 @@
         "repositoryURL": "https://github.com/google/GoogleDataTransport.git",
         "state": {
           "branch": null,
-          "revision": "7fb27ea49414b9c5483503cd06baa821c8654d1e",
-          "version": "9.1.1"
+          "revision": "15ccdfd25ac55b9239b82809531ff26605e7556e",
+          "version": "9.1.2"
         }
       },
       {
@@ -69,8 +78,8 @@
         "repositoryURL": "https://github.com/google/GoogleUtilities.git",
         "state": {
           "branch": null,
-          "revision": "616fac2626b6b2d1424d79a6f786b4e2ed1cfb49",
-          "version": "7.5.2"
+          "revision": "797005ad8a1f0614063933e2fa010a5d13cb09d0",
+          "version": "7.6.0"
         }
       },
       {
@@ -91,6 +100,24 @@
           "version": "1.7.0"
         }
       },
+      {
+        "package": "IHProgressHUD",
+        "repositoryURL": "https://github.com/marinofaggiana/IHProgressHUD",
+        "state": {
+          "branch": "master",
+          "revision": "a3d94dfb869ff9b2f9e5a4d0359a73a625072853",
+          "version": null
+        }
+      },
+      {
+        "package": "NCCommunication",
+        "repositoryURL": "https://github.com/nextcloud/ios-communication-library/",
+        "state": {
+          "branch": "develop",
+          "revision": "519f7482025b77147eb1df2f3bbd60655ce12efe",
+          "version": null
+        }
+      },
       {
         "package": "leveldb",
         "repositoryURL": "https://github.com/firebase/leveldb.git",
@@ -141,8 +168,8 @@
         "repositoryURL": "https://github.com/google/promises.git",
         "state": {
           "branch": null,
-          "revision": "611337c330350c9c1823ad6d671e7f936af5ee13",
-          "version": "2.0.0"
+          "revision": "afa9a1ace74e116848d4f743599ab83e584ff8cb",
+          "version": "1.2.12"
         }
       },
       {
@@ -168,8 +195,8 @@
         "repositoryURL": "https://github.com/realm/realm-cocoa",
         "state": {
           "branch": null,
-          "revision": "7ca0ce1dd58553d5be1ec9cc7283b068c256979d",
-          "version": "10.17.0"
+          "revision": "9f43d0da902c55b493d6c8bb63203764caa8acbe",
+          "version": "10.18.0"
         }
       },
       {
@@ -225,6 +252,24 @@
           "revision": "9bf4b5af6bb4386865636fc504d6c588c2b65040",
           "version": "3.7.2"
         }
+      },
+      {
+        "package": "SwiftyJSON",
+        "repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON",
+        "state": {
+          "branch": null,
+          "revision": "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07",
+          "version": "5.0.1"
+        }
+      },
+      {
+        "package": "SwiftyXMLParser",
+        "repositoryURL": "https://github.com/yahoojapan/SwiftyXMLParser",
+        "state": {
+          "branch": null,
+          "revision": "ad5eeeaf7797f69e26943aaa53c81c6a9fdaa516",
+          "version": "5.5.0"
+        }
       }
     ]
   },

+ 38 - 10
Share/NCShareExtension.swift

@@ -23,6 +23,7 @@
 
 import UIKit
 import NCCommunication
+import IHProgressHUD
 
 class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDelegate, NCRenameFileDelegate, NCAccountRequestDelegate {
     
@@ -65,6 +66,9 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
     private var activeAccount: tableAccount!
     private let chunckSize = CCUtility.getChunkSize() * 1000000
     
+    private var numberFilesName: Int = 0
+    private var counterUpload: Int = 0
+    
     // MARK: - View Life Cycle
 
     override func viewDidLoad() {
@@ -122,6 +126,13 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
         } else {
             NCCommunicationCommon.shared.writeLog("Start session with level \(levelLog) " + versionNextcloudiOS)
         }
+        
+        // HUD
+        IHProgressHUD.set(viewForExtension: self.view)
+        IHProgressHUD.set(defaultMaskType: .clear)
+        IHProgressHUD.set(minimumDismiss: 2)
+        
+        NotificationCenter.default.addObserver(self, selector: #selector(triggerProgressTask(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object:nil)
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -186,6 +197,18 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
     
     // MARK: -
 
+    @objc func triggerProgressTask(_ notification: NSNotification) {
+        
+        if let userInfo = notification.userInfo as NSDictionary?, let progressNumber = userInfo["progress"] as? NSNumber {
+            
+            let progress = CGFloat(progressNumber.floatValue)
+            let status =  NSLocalizedString("_upload_file_", comment: "") + " \(self.counterUpload) " + NSLocalizedString("_of_", comment: "") + " \(self.numberFilesName)"
+            IHProgressHUD.show(progress: progress, status: status)
+        }
+    }
+    
+    // MARK: -
+
     func setAccount(account: String) {
         
         guard let activeAccount = NCManageDatabase.shared.getAccount(predicate: NSPredicate(format: "account == %@", account)) else {
@@ -328,7 +351,8 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
                 self.tableView.isScrollEnabled = false
             }
             // Label upload button
-            uploadLabel.text = NSLocalizedString("_upload_", comment: "") + " \(filesName.count) " + NSLocalizedString("_files_", comment: "")
+            numberFilesName = filesName.count
+            uploadLabel.text = NSLocalizedString("_upload_", comment: "") + " \(numberFilesName) " + NSLocalizedString("_files_", comment: "")
             // Empty
             emptyDataSet = NCEmptyDataSet.init(view: collectionView, offset: -50*counter, delegate: self)
             self.tableView.reloadData()
@@ -384,14 +408,13 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
         
         if let fileName = filesName.first {
             
+            counterUpload += 1
             filesName.removeFirst()
             let ocId = NSUUID().uuidString
             let filePath = CCUtility.getDirectoryProviderStorageOcId(ocId, fileNameView: fileName)!
                 
             if NCUtilityFileSystem.shared.moveFile(atPath: (NSTemporaryDirectory() + fileName), toPath: filePath) {
-                
-                NCUtility.shared.startActivityIndicator(backgroundView: self.view, blurEffect: true)
-                                
+                                                
                 let metadata = NCManageDatabase.shared.createMetadata(account: activeAccount.account, user: activeAccount.user, userId: activeAccount.userId, fileName: fileName, fileNameView: fileName, ocId: ocId, serverUrl: serverUrl, urlBase: activeAccount.urlBase, url: "", contentType: "", livePhoto: false)
                 
                 metadata.session = NCCommunicationCommon.shared.sessionIdentifierUpload
@@ -412,28 +435,33 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
                 NCNetworking.shared.upload(metadata: metadata) {
                     
                 } completion: { (errorCode, errorDescription) in
-                    
-                    NCUtility.shared.stopActivityIndicator()
-                    
+                                        
                     if errorCode == 0 {
+                                                
                         self.actionUpload()
+                        
                     } else {
                         
+                        IHProgressHUD.dismiss()
+
                         NCManageDatabase.shared.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", ocId))
                         NCManageDatabase.shared.deleteChunks(account: self.activeAccount.account, ocId: ocId)
                         
                         let alertController = UIAlertController(title: NSLocalizedString("_error_", comment: ""), message: errorDescription, preferredStyle: .alert)
                         alertController.addAction(UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default, handler: { _ in
                             self.extensionContext?.completeRequest(returningItems: self.extensionContext?.inputItems, completionHandler: nil)
-                            return
                         }))
                         self.present(alertController, animated: true)
                     }
                 }
             }
         } else {
-            extensionContext?.completeRequest(returningItems: extensionContext?.inputItems, completionHandler: nil)
-            return
+            
+            IHProgressHUD.showSuccesswithStatus(NSLocalizedString("_success_", comment: ""))
+
+            DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
+                self.extensionContext?.completeRequest(returningItems: self.extensionContext?.inputItems, completionHandler: nil)
+            }
         }
     }
     

+ 4 - 0
iOSClient/AppDelegate.swift

@@ -27,6 +27,7 @@ import NCCommunication
 import TOPasscodeViewController
 import LocalAuthentication
 import Firebase
+import IHProgressHUD
 
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, TOPasscodeViewControllerDelegate, NCAccountRequestDelegate, NCViewCertificateDetailsDelegate {
@@ -202,6 +203,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         if account == "" { return }
         guard let activeAccount = NCManageDatabase.shared.getActiveAccount() else { return }
         
+        // close HUD
+        IHProgressHUD.dismiss()
+        
         // Account changed ??
         if activeAccount.account != account {
             settingAccount(activeAccount.account, urlBase: activeAccount.urlBase, user: activeAccount.user, userId: activeAccount.userId, password: CCUtility.getPassword(activeAccount.account))

+ 2 - 2
iOSClient/Main/Create cloud/NCCreateFormUploadConflictCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 25 - 17
iOSClient/Main/NCFunctionCenter.swift

@@ -24,6 +24,7 @@
 import UIKit
 import NCCommunication
 import Queuer
+import IHProgressHUD
 
 @objc class NCFunctionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelectDelegate {
     @objc public static let shared: NCFunctionCenter = {
@@ -130,7 +131,7 @@ import Queuer
                         }
                             
                         if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) && CCUtility.fileProviderStorageExists(metadataMOV.ocId, fileNameView: metadataMOV.fileNameView) {
-                            saveLivePhotoToDisk(metadata: metadata, metadataMov: metadataMOV, progressView: nil, viewActivity: self.appDelegate.window?.rootViewController?.view)
+                            saveLivePhotoToDisk(metadata: metadata, metadataMov: metadataMOV)
                         }
                     
                     case NCGlobal.shared.selectorSaveAsScan:
@@ -352,34 +353,34 @@ import Queuer
         }
         
         if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) && CCUtility.fileProviderStorageExists(metadataMOV.ocId, fileNameView: metadataMOV.fileNameView) {
-            saveLivePhotoToDisk(metadata: metadata, metadataMov: metadataMOV, progressView: nil, viewActivity: self.appDelegate.window?.rootViewController?.view)
+            saveLivePhotoToDisk(metadata: metadata, metadataMov: metadataMOV)
         }
     }
     
-    func saveLivePhotoToDisk(metadata: tableMetadata, metadataMov: tableMetadata, progressView: UIProgressView?, viewActivity: UIView?) {
+    func saveLivePhotoToDisk(metadata: tableMetadata, metadataMov: tableMetadata) {
         
         let fileNameImage = URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)!)
         let fileNameMov = URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageOcId(metadataMov.ocId, fileNameView: metadataMov.fileNameView)!)
         
-        if let view = viewActivity {
-            NCUtility.shared.startActivityIndicator(backgroundView: view, blurEffect: true)
-        }
+        IHProgressHUD.set(defaultMaskType: .clear)
+        IHProgressHUD.set(minimumDismiss: 2)
         
         NCLivePhoto.generate(from: fileNameImage, videoURL: fileNameMov, progress: { progress in
-            DispatchQueue.main.async {
-                progressView?.progress = Float(progress)
-            }
+                
+            IHProgressHUD.show(progress: CGFloat(progress))
+            
         }, completion: { livePhoto, resources in
-            NCUtility.shared.stopActivityIndicator()
-            progressView?.progress = 0
+    
             if resources != nil {
                 NCLivePhoto.saveToLibrary(resources!) { (result) in
                     if !result {
-                        NCContentPresenter.shared.messageNotification("_error_", description: "_livephoto_save_error_", delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: NCGlobal.shared.errorInternalError)
+                        IHProgressHUD.showError(withStatus: NSLocalizedString("_livephoto_save_error_", comment: ""))
+                    } else {
+                        IHProgressHUD.showSuccesswithStatus(NSLocalizedString("_success_", comment: ""))
                     }
                 }
             } else {
-                NCContentPresenter.shared.messageNotification("_error_", description: "_livephoto_save_error_", delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: NCGlobal.shared.errorInternalError)
+                IHProgressHUD.showError(withStatus: NSLocalizedString("_livephoto_save_error_", comment: ""))
             }
         })
     }
@@ -457,17 +458,24 @@ import Queuer
                 let fileNameLocalPath = CCUtility.getDirectoryProviderStorageOcId(ocIdUpload, fileNameView: fileName)!
                 try data.write(to: URL(fileURLWithPath: fileNameLocalPath))
                
-                NCUtility.shared.startActivityIndicator(backgroundView: nil, blurEffect: true)
-                NCCommunication.shared.upload(serverUrlFileName: serverUrlFileName, fileNameLocalPath: fileNameLocalPath) { account, ocId, etag, date, size, allHeaderFields, errorCode, errorDescription in
+                IHProgressHUD.set(defaultMaskType: .clear)
+                IHProgressHUD.set(minimumDismiss: 2)
+
+                NCCommunication.shared.upload(serverUrlFileName: serverUrlFileName, fileNameLocalPath: fileNameLocalPath) { task in
+                } progressHandler: { progress in
+                    
+                    IHProgressHUD.show(progress: CGFloat(progress.fractionCompleted), status: fileName)
+                    
+                } completionHandler: { account, ocId, etag, date, size, allHeaderFields, errorCode, errorDescription in
                     if errorCode == 0 && etag != nil && ocId != nil {
                         let toPath = CCUtility.getDirectoryProviderStorageOcId(ocId!, fileNameView: fileName)!
                         NCUtilityFileSystem.shared.moveFile(atPath: fileNameLocalPath, toPath: toPath)
                         NCManageDatabase.shared.addLocalFile(account: account, etag: etag!, ocId: ocId!, fileName: fileName)
                         NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataSourceNetworkForced, userInfo: ["serverUrl": serverUrl])
+                        IHProgressHUD.showSuccesswithStatus(NSLocalizedString("_success_", comment: ""))
                     } else {
-                        NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode, forced: false)
+                        IHProgressHUD.showError(withStatus: NSLocalizedString(errorDescription, comment: ""))
                     }
-                    NCUtility.shared.stopActivityIndicator()
                 }
             } catch {
                 return false

+ 3 - 3
iOSClient/Settings/Acknowledgements.rtf

@@ -1,4 +1,4 @@
-{\rtf1\ansi\ansicpg1252\cocoartf2578
+{\rtf1\ansi\ansicpg1252\cocoartf2580
 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;}
 {\colortbl;\red255\green255\blue255;}
 {\*\expandedcolortbl;;}
@@ -199,11 +199,11 @@ Copyright (c)  Tim Oliver\
 ____________________________________________\
 \
 
-\f1\b ChromaColorPicker
+\f1\b IHProgressHUD
 \f0\b0 \
 \
 MIT License\
 \
-Copyright (c)  Jonathan Cardasis\
+Copyright (c)  Md Ibrahim Hassan\
 ____________________________________________\
 }

+ 3 - 3
iOSClient/Share/NCShare.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ts3-RO-A9l">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ts3-RO-A9l">
     <device id="retina5_5" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -18,7 +18,7 @@
                         <viewLayoutGuide key="safeArea" id="EQO-kT-aOm"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     </view>
-                    <navigationItem key="navigationItem" id="3f0-GZ-Z6m"/>
+                    <navigationItem key="navigationItem" largeTitleDisplayMode="never" id="3f0-GZ-Z6m"/>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="DIg-rR-e8m" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>

+ 3 - 2
iOSClient/Share/NCSharePaging.swift

@@ -6,6 +6,7 @@
 //  Copyright © 2019 Marino Faggiana. All rights reserved.
 //
 //  Author Marino Faggiana <marino.faggiana@nextcloud.com>
+//  Author Henrik Storch <henrik.storch@nextcloud.com>
 //
 //  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
@@ -149,12 +150,12 @@ class NCSharePaging: UIViewController {
 extension NCSharePaging: PagingViewControllerDelegate {
     
     func pagingViewController(_ pagingViewController: PagingViewController, willScrollToItem pagingItem: PagingItem, startingViewController: UIViewController, destinationViewController: UIViewController) {
-        
+
         guard
             let item = pagingItem as? PagingIndexItem,
             let itemIndex = NCGlobal.NCSharePagingIndex(rawValue: item.index)
         else { return }
-         
+
         if itemIndex == .activity && !activityEnabled {
             pagingViewController.contentInteraction = .none
         } else if itemIndex == .sharing && !sharingEnabled {

+ 3 - 1
iOSClient/Shares/NCShares.swift

@@ -49,7 +49,9 @@ class NCShares: NCCollectionViewCommon  {
             let sharess = NCManageDatabase.shared.getTableShares(account: self.appDelegate.account)
             for share in sharess {
                 if let metadata = NCManageDatabase.shared.getMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND fileName == %@", self.appDelegate.account, share.serverUrl, share.fileName)) {
-                    self.metadatasSource.append(metadata)
+                    if !(self.metadatasSource.contains { $0.ocId == metadata.ocId }) {
+                        self.metadatasSource.append(metadata)
+                    }
                 }
             }
             

二进制
iOSClient/Supporting Files/af.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ar.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ast.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/az.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/br.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/bs.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ca.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/da.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/de.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/el.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/en-GB.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/eo.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-419.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-AR.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-SV.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-UY.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/et_EE.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/eu.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/fa.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/fr.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/gl.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/he.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/hr.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/hu.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ia.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/id.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/is.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/it.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/km.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ko.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/lb.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/lo.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/lv.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/mk.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/mn.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/nl.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/oc.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/pl.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ro.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/ru.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sc.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/si.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sl.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sq.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sr.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/sv.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/th_TH.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/tr.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/uk.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/vi.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings