Browse Source

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
1a6a19b352

+ 0 - 7
iOSClient/Activity/NCActivityTableViewCell.swift

@@ -117,13 +117,6 @@ class NCActivityTableViewCell: UITableViewCell, NCCellProtocol {
         guard let fileUser = fileUser else { return }
         viewController?.showProfileMenu(userId: fileUser)
     }
-
-    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
-    func setButtonMore(named: String, image: UIImage) {}
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
-    func selectMode(_ status: Bool) {}
-    func selected(_ status: Bool) {}
 }
 
 // MARK: - Collection View

+ 2 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -1707,6 +1707,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             }
 
             //cell.accessibilityLabel = metadata.fileNameView + ", " + (cell.labelInfo.text ?? "")
+            //cell.accessibilityValue = a11yValues.joined(separator: ", ")
 
         }
 
@@ -1730,7 +1731,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
 
 
 
-            cell.accessibilityValue = a11yValues.joined(separator: ", ")
+            
 
             return cell
         }

+ 0 - 2
iOSClient/Main/Collection Common/NCGridCell.swift

@@ -171,8 +171,6 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
         buttonMore.isHidden = status
     }
 
-    func hideButtonShare(_ status: Bool) {}
-
     func selectMode(_ status: Bool) {
         if status {
             imageSelect.isHidden = false

+ 9 - 0
iOSClient/Main/NCCellProtocol.swift

@@ -45,3 +45,12 @@ protocol NCCellProtocol {
     func selectMode(_ status: Bool)
     func selected(_ status: Bool)
 }
+
+extension NCCellProtocol {
+    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
+    func setButtonMore(named: String, image: UIImage) {}
+    func hideButtonShare(_ status: Bool) {}
+    func hideButtonMore(_ status: Bool) {}
+    func selectMode(_ status: Bool) {}
+    func selected(_ status: Bool) {}
+}

+ 0 - 5
iOSClient/Media/Cell/NCGridMediaCell.swift

@@ -126,9 +126,4 @@ class NCGridMediaCell: UICollectionViewCell, NCCellProtocol {
             imageVisualEffect.isHidden = true
         }
     }
-
-    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
-    func setButtonMore(named: String, image: UIImage) {}
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
 }

+ 0 - 7
iOSClient/Notification/NCNotification.swift

@@ -399,13 +399,6 @@ class NCNotificationCell: UITableViewCell, NCCellProtocol {
         else { return }
         delegate?.tapAction(with: notification, label: label)
     }
-
-    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
-    func setButtonMore(named: String, image: UIImage) {}
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
-    func selectMode(_ status: Bool) {}
-    func selected(_ status: Bool) {}
 }
 
 protocol NCNotificationCellDelegate: AnyObject {

+ 0 - 7
iOSClient/Share/NCShareCommentsCell.swift

@@ -104,13 +104,6 @@ class NCShareCommentsCell: UITableViewCell, NCCellProtocol {
     @IBAction func touchUpInsideMenu(_ sender: Any) {
         delegate?.tapMenu(with: tableComments, sender: sender)
     }
-
-    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
-    func setButtonMore(named: String, image: UIImage) {}
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
-    func selectMode(_ status: Bool) {}
-    func selected(_ status: Bool) {}
 }
 
 protocol NCShareCommentsCellDelegate: AnyObject {

+ 2 - 16
iOSClient/Share/NCShareUserCell.swift

@@ -157,13 +157,6 @@ class NCShareUserCell: UITableViewCell, NCCellProtocol {
     @IBAction func quickStatusClicked(_ sender: Any) {
         delegate?.quickStatus(with: tableShare, sender: sender)
     }
-
-    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
-    func setButtonMore(named: String, image: UIImage) {}
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
-    func selectMode(_ status: Bool) {}
-    func selected(_ status: Bool) {}
 }
 
 protocol NCShareUserCellDelegate: AnyObject {
@@ -185,11 +178,11 @@ class NCSearchUserDropDownCell: DropDownCell, NCCellProtocol {
     private var user: String = ""
 
     var filePreviewImageView: UIImageView? {
-        get { return imageItem }
+        get { return nil }
         set {}
     }
     var fileAvatarImageView: UIImageView? {
-        get { return nil }
+        get { return imageItem }
     }
     var fileObjectId: String? {
         get { return nil }
@@ -274,11 +267,4 @@ class NCSearchUserDropDownCell: DropDownCell, NCCellProtocol {
                 }
         }
     }
-
-    func writeInfoDateSize(date: NSDate, totalBytes: Int64) {}
-    func setButtonMore(named: String, image: UIImage) {}
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
-    func selectMode(_ status: Bool) {}
-    func selected(_ status: Bool) {}
 }

+ 0 - 5
iOSClient/Transfers/NCTransferCell.swift

@@ -161,11 +161,6 @@ class NCTransferCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellP
     func writeInfoDateSize(date: NSDate, totalBytes: Int64) {
         labelInfo.text = CCUtility.dateDiff(date as Date) + " · " + CCUtility.transformedSize(totalBytes)
     }
-
-    func hideButtonShare(_ status: Bool) {}
-    func hideButtonMore(_ status: Bool) {}
-    func selectMode(_ status: Bool) {}
-    func selected(_ status: Bool) {}
 }
 
 protocol NCTransferCellDelegate: AnyObject {