|
@@ -537,7 +537,16 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
if let cell = collectionView?.cellForItem(at: IndexPath(row: index, section: 0)) {
|
|
|
if cell is NCListCell {
|
|
|
let cell = cell as! NCListCell
|
|
|
- if progressNumber.floatValue > 0 {
|
|
|
+ if progressNumber.floatValue == 1 {
|
|
|
+ cell.progressView?.isHidden = true
|
|
|
+ cell.progressView?.progress = .zero
|
|
|
+ cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCBrandColor.cacheImages.buttonMore)
|
|
|
+ if let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) {
|
|
|
+ cell.labelInfo.text = CCUtility.dateDiff(metadata.date as Date) + " · " + CCUtility.transformedSize(metadata.size)
|
|
|
+ } else {
|
|
|
+ cell.labelInfo.text = ""
|
|
|
+ }
|
|
|
+ } else if progressNumber.floatValue > 0 {
|
|
|
cell.progressView?.isHidden = false
|
|
|
cell.progressView?.progress = progressNumber.floatValue
|
|
|
cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCBrandColor.cacheImages.buttonStop)
|
|
@@ -549,7 +558,12 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
}
|
|
|
} else if cell is NCTransferCell {
|
|
|
let cell = cell as! NCTransferCell
|
|
|
- if progressNumber.floatValue > 0 {
|
|
|
+ if progressNumber.floatValue == 1 {
|
|
|
+ cell.progressView?.isHidden = true
|
|
|
+ cell.progressView?.progress = .zero
|
|
|
+ cell.buttonMore.isHidden = true
|
|
|
+ cell.labelInfo.text = ""
|
|
|
+ } else if progressNumber.floatValue > 0 {
|
|
|
cell.progressView?.isHidden = false
|
|
|
cell.progressView?.progress = progressNumber.floatValue
|
|
|
cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCBrandColor.cacheImages.buttonStop)
|
|
@@ -561,7 +575,11 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
}
|
|
|
} else if cell is NCGridCell {
|
|
|
let cell = cell as! NCGridCell
|
|
|
- if progressNumber.floatValue > 0 {
|
|
|
+ if progressNumber.floatValue == 1 {
|
|
|
+ cell.progressView.isHidden = true
|
|
|
+ cell.progressView.progress = .zero
|
|
|
+ cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCBrandColor.cacheImages.buttonMore)
|
|
|
+ } else if progressNumber.floatValue > 0 {
|
|
|
cell.progressView.isHidden = false
|
|
|
cell.progressView.progress = progressNumber.floatValue
|
|
|
cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCBrandColor.cacheImages.buttonStop)
|