marinofaggiana 3 years ago
parent
commit
9d05a2f63a

+ 1 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -543,6 +543,7 @@
 "_status_wait_upload_"          = "Waiting for upload";
 "_status_in_upload_"            = "In upload";
 "_status_uploading_"            = "Uploading";
+"_status_upload_error_"         = "Error, waiting for upload";
 "_select_media_folder_"         = "Select the \"Media\" folder";
 "_media_viewimage_show_"        = "Show images";
 "_media_viewimage_hide_"        = "Hide images";

+ 5 - 1
iOSClient/Transfers/NCTransfers.swift

@@ -243,6 +243,10 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate  {
             cell.labelStatus.text = NSLocalizedString("_status_uploading_", comment: "")
             cell.labelInfo.text = CCUtility.transformedSize(metadata.size) + " - ↑ " + CCUtility.transformedSize(totalBytes)
             break
+        case NCGlobal.shared.metadataStatusUploadError:
+            cell.labelStatus.text = NSLocalizedString("_status_upload_error_", comment: "")
+            cell.labelInfo.text = CCUtility.transformedSize(metadata.size)
+            break
         default:
             cell.labelStatus.text = ""
             cell.labelInfo.text = ""
@@ -264,7 +268,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate  {
     override func reloadDataSource() {
         super.reloadDataSource()
                 
-        metadatasSource = NCManageDatabase.shared.getAdvancedMetadatas(predicate: NSPredicate(format: "status == %i || status == %i || status == %i || status == %i || status == %i || status == %i", NCGlobal.shared.metadataStatusWaitDownload, NCGlobal.shared.metadataStatusInDownload, NCGlobal.shared.metadataStatusDownloading, NCGlobal.shared.metadataStatusWaitUpload, NCGlobal.shared.metadataStatusInUpload, NCGlobal.shared.metadataStatusUploading), page: 1, limit: 100, sorted: "sessionTaskIdentifier", ascending: false)
+        metadatasSource = NCManageDatabase.shared.getAdvancedMetadatas(predicate: NSPredicate(format: "status != %i", NCGlobal.shared.metadataStatusNormal), page: 1, limit: 100, sorted: "sessionTaskIdentifier", ascending: false)
         self.dataSource = NCDataSource.init(metadatasSource: metadatasSource)
         
         refreshControl.endRefreshing()