@@ -28,7 +28,6 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
2828 @IBOutlet weak var imageSelect : UIImageView !
2929 @IBOutlet weak var imageStatus : UIImageView !
3030 @IBOutlet weak var imageFavorite : UIImageView !
31- @IBOutlet weak var imageFavoriteBackground : UIImageView !
3231 @IBOutlet weak var imageLocal : UIImageView !
3332 @IBOutlet weak var labelTitle : UILabel !
3433 @IBOutlet weak var labelInfo : UILabel !
@@ -39,12 +38,9 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
3938 @IBOutlet weak var buttonMore : UIButton !
4039 @IBOutlet weak var progressView : UIProgressView !
4140 @IBOutlet weak var separator : UIView !
42- @IBOutlet weak var tag0 : UILabel !
43- @IBOutlet weak var tag1 : UILabel !
44-
41+ @IBOutlet weak var labelShared : UILabel !
4542 @IBOutlet weak var imageItemLeftConstraint : NSLayoutConstraint !
4643 @IBOutlet weak var separatorHeightConstraint : NSLayoutConstraint !
47- @IBOutlet weak var titleTrailingConstraint : NSLayoutConstraint !
4844 @IBOutlet weak var subInfoTrailingConstraint : NSLayoutConstraint !
4945
5046 private var objectId = " "
@@ -85,6 +81,10 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
8581 get { return progressView }
8682 set { progressView = newValue }
8783 }
84+ var fileSelectImage : UIImageView ? {
85+ get { return imageSelect }
86+ set { imageSelect = newValue }
87+ }
8888 var fileStatusImage : UIImageView ? {
8989 get { return imageStatus }
9090 set { imageStatus = newValue }
@@ -109,7 +109,10 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
109109 get { return separator }
110110 set { separator = newValue }
111111 }
112-
112+ var fileSharedLabel : UILabel ? {
113+ get { return labelShared }
114+ set { labelShared = newValue }
115+ }
113116 override func awakeFromNib( ) {
114117 super. awakeFromNib ( )
115118
@@ -137,23 +140,14 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
137140
138141 labelTitle. text = " "
139142 labelInfo. text = " "
140- labelSubinfo. text = " "
141- labelTitle. textColor = NCBrandColor . shared. textColor
142- labelInfo. textColor = NCBrandColor . shared. textColor2
143- labelSubinfo. textColor = NCBrandColor . shared. textColor2
144-
145- imageFavoriteBackground. isHidden = true
143+ labelTitle. textColor = . label
144+ labelInfo. textColor = . systemGray
145+ labelSubinfo. textColor = . systemGray
146146 }
147147
148148 override func prepareForReuse( ) {
149149 super. prepareForReuse ( )
150150 imageItem. backgroundColor = nil
151- if fileFavoriteImage? . image != nil {
152- imageFavoriteBackground. isHidden = false
153- } else {
154- imageFavoriteBackground. isHidden = true
155- }
156-
157151 accessibilityHint = nil
158152 accessibilityLabel = nil
159153 accessibilityValue = nil
@@ -190,12 +184,10 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
190184 }
191185
192186 func titleInfoTrailingFull( ) {
193- titleTrailingConstraint. constant = 10
194187 subInfoTrailingConstraint. constant = 10
195188 }
196189
197190 func titleInfoTrailingDefault( ) {
198- titleTrailingConstraint. constant = 90
199191 subInfoTrailingConstraint. constant = 90
200192 }
201193
@@ -257,52 +249,14 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
257249 }
258250
259251 func writeInfoDateSize( date: NSDate , size: Int64 ) {
260- labelInfo. text = NCUtility ( ) . dateDiff ( date as Date )
261- labelSubinfo. text = " · " + NCUtilityFileSystem ( ) . transformedSize ( size )
252+ labelInfo. text = NCUtility ( ) . dateDiff ( date as Date ) + " · " + NCUtilityFileSystem ( ) . transformedSize ( size )
253+ labelSubinfo. text = " "
262254 }
263255
264256 func setAccessibility( label: String , value: String ) {
265257 accessibilityLabel = label
266258 accessibilityValue = value
267259 }
268-
269- func setTags( tags: [ String ] ) {
270- if tags. isEmpty {
271- tag0. isHidden = true
272- tag1. isHidden = true
273- labelInfo. isHidden = false
274- labelSubinfo. isHidden = false
275- } else {
276- tag0. isHidden = false
277- tag1. isHidden = true
278- labelInfo. isHidden = true
279- labelSubinfo. isHidden = true
280-
281- if let tag = tags. first {
282- tag0. text = tag
283- if tags. count > 1 {
284- tag1. isHidden = false
285- tag1. text = " + \( tags. count - 1 ) "
286- }
287- }
288- }
289- }
290-
291- func setIconOutlines( ) {
292- imageFavoriteBackground. isHidden = fileFavoriteImage? . image == nil
293-
294- if imageStatus. image != nil {
295- imageStatus. makeCircularBackground ( withColor: . systemBackground)
296- } else {
297- imageStatus. backgroundColor = . clear
298- }
299-
300- if imageLocal. image != nil {
301- imageLocal. makeCircularBackground ( withColor: . systemBackground)
302- } else {
303- imageLocal. backgroundColor = . clear
304- }
305- }
306260}
307261
308262protocol NCListCellDelegate : AnyObject {
0 commit comments