marinofaggiana 4 жил өмнө
parent
commit
92fea3dce8

+ 1 - 1
Cartfile

@@ -10,7 +10,7 @@ github "WeTransfer/WeScan" "1.2.0"
 github "malcommac/SwiftRichString"
 github "yannickl/QRCodeReader.swift" "10.1.1"
 github "weichsel/ZIPFoundation" "0.9.10"
-github "rechsteiner/Parchment" "v1.7.0"
+github "rechsteiner/Parchment"
 github "WenchaoD/FSCalendar" "2.8.0"
 github "AssistoLab/DropDown" "v2.3.13"
 github "krzyzanowskim/OpenSSL" "1.0.218"

+ 3 - 3
Cartfile.resolved

@@ -1,4 +1,4 @@
-github "Alamofire/Alamofire" "5.2.1"
+github "Alamofire/Alamofire" "5.2.2"
 github "AssistoLab/DropDown" "v2.3.13"
 github "CocoaLumberjack/CocoaLumberjack" "3.6.1"
 github "FabrizioBrancati/Queuer" "2.1.1"
@@ -18,9 +18,9 @@ github "krzyzanowskim/OpenSSL" "1.0.218"
 github "malcommac/SwiftRichString" "3.7.2"
 github "marinofaggiana/KTVHTTPCache" "2.0.2"
 github "marinofaggiana/TOPasscodeViewController" "0.0.7"
-github "nextcloud/ios-communication-library" "b6dd294d72ee87b6c12ed6fefe6e70458a9e7f5e"
+github "nextcloud/ios-communication-library" "4ec1d6b12eff71ccf78eccf566a175f90bd6c280"
 github "realm/realm-cocoa" "v5.3.2"
-github "rechsteiner/Parchment" "v1.7.0"
+github "rechsteiner/Parchment" "v2.4.0"
 github "scenee/FloatingPanel" "v1.7.5"
 github "tilltue/TLPhotoPicker" "2.0.12"
 github "weichsel/ZIPFoundation" "0.9.10"

+ 13 - 12
iOSClient/Share/NCSharePaging.swift

@@ -68,7 +68,7 @@ class NCSharePaging: UIViewController {
         pagingViewController.dataSource = self
         pagingViewController.delegate = self
         pagingViewController.select(index: indexPage)
-        let pagingIndexItem = self.pagingViewController(pagingViewController, pagingItemForIndex: indexPage) as PagingIndexItem
+        let pagingIndexItem = self.pagingViewController(pagingViewController, pagingItemAt: indexPage) as! PagingIndexItem
         self.title = pagingIndexItem.title
         
         changeTheming()
@@ -110,7 +110,7 @@ class NCSharePaging: UIViewController {
 
 extension NCSharePaging: PagingViewControllerDelegate {
     
-    func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, willScrollToItem pagingItem: T, startingViewController: UIViewController, destinationViewController: UIViewController) where T : PagingItem, T : Comparable, T : Hashable {
+    func pagingViewController(_ pagingViewController: PagingViewController, willScrollToItem pagingItem: PagingItem, startingViewController: UIViewController, destinationViewController: UIViewController) {
         
         guard let item = pagingItem as? PagingIndexItem else { return }
         self.title = item.title
@@ -121,8 +121,8 @@ extension NCSharePaging: PagingViewControllerDelegate {
 
 extension NCSharePaging: PagingViewControllerDataSource {
     
-    func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, viewControllerForIndex index: Int) -> UIViewController {
-        
+    func pagingViewController(_: PagingViewController, viewControllerAt index: Int) -> UIViewController {
+    
         let height = pagingViewController.options.menuHeight + NCSharePagingView.HeaderHeight
         let topSafeArea = UIApplication.shared.keyWindow?.safeAreaInsets.top ?? 0
         
@@ -149,27 +149,28 @@ extension NCSharePaging: PagingViewControllerDataSource {
         }
     }
     
-    func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, pagingItemForIndex index: Int) -> T {
+    func pagingViewController(_: PagingViewController, pagingItemAt index: Int) -> PagingItem {
+        
         switch index {
         case 0:
-            return PagingIndexItem(index: index, title: NSLocalizedString("_activity_", comment: "")) as! T
+            return PagingIndexItem(index: index, title: NSLocalizedString("_activity_", comment: ""))
         case 1:
-            return PagingIndexItem(index: index, title: NSLocalizedString("_comments_", comment: "")) as! T
+            return PagingIndexItem(index: index, title: NSLocalizedString("_comments_", comment: ""))
         case 2:
-            return PagingIndexItem(index: index, title: NSLocalizedString("_sharing_", comment: "")) as! T
+            return PagingIndexItem(index: index, title: NSLocalizedString("_sharing_", comment: ""))
         default:
-            return PagingIndexItem(index: index, title: "") as! T
+            return PagingIndexItem(index: index, title: "")
         }
     }
-    
-    func numberOfViewControllers<T>(in: PagingViewController<T>) -> Int{
+   
+    func numberOfViewControllers(in pagingViewController: PagingViewController) -> Int {
         return 3
     }
 }
 
 // MARK: - Header
 
-class NCShareHeaderViewController: PagingViewController<PagingIndexItem> {
+class NCShareHeaderViewController: PagingViewController {
     
     public var image: UIImage?
     public var metadata: tableMetadata?