瀏覽代碼

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 年之前
父節點
當前提交
398ba9db10

+ 1 - 1
iOSClient/Networking/NCNetworking.swift

@@ -418,7 +418,7 @@ import Queuer
     // MARK: - Upload
 
     @objc func upload(metadata: tableMetadata, start: @escaping () -> Void, completion: @escaping (_ errorCode: Int, _ errorDescription: String) -> Void) {
-        
+
         func uploadMetadata(_ metadata: tableMetadata) {
 
             // DETECT IF CHUNCK

+ 1 - 1
iOSClient/Networking/NCNetworkingCheckRemoteUser.swift

@@ -66,7 +66,7 @@ import NCCommunication
 
                     } else {
 
-                        if UIApplication.shared.applicationState == .active &&  NCCommunication.shared.isNetworkReachable() {
+                         if UIApplication.shared.applicationState == .active && NCCommunication.shared.isNetworkReachable() && !CCUtility.getPassword(account).isEmpty {
                             let description = String.localizedStringWithFormat(NSLocalizedString("_error_check_remote_user_", comment: ""), tableAccount.user, tableAccount.urlBase)
                             NCContentPresenter.shared.messageNotification("_error_", description: description, delay: NCGlobal.shared.dismissAfterSecondLong, type: NCContentPresenter.messageType.error, errorCode: errorCode, priority: .max)
                             CCUtility.setPassword(account, password: nil)

+ 6 - 0
iOSClient/Networking/NCNetworkingProcessUpload.swift

@@ -85,6 +85,12 @@ class NCNetworkingProcessUpload: NSObject {
 
                     for metadata in metadatas {
 
+                        // Different account
+                        if self.appDelegate.account != metadata.account {
+                            NCCommunicationCommon.shared.writeLog("Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView) on account: \(metadata.account), because the actual account is \(self.appDelegate.account).")
+                            continue
+                        }
+
                         // Is already in upload background? skipped
                         if listOcId.contains(metadata.ocId) {
                             NCCommunicationCommon.shared.writeLog("Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView), because is already in session.")

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

@@ -891,6 +891,7 @@
 "_subtitle_not_found_"      = "Subtitle not found";
 "_disable_"                 = "Disable";
 "_subtitle_not_dowloaded_"  = "There are subtitles not downloaded locally";
+"_user_"                    = "User";
 
 // Tip
 "_tip_pdf_thumbnails_"      = "Swipe left from the right edge of the screen to show the thumbnails.";

+ 3 - 0
iOSClient/Transfers/NCTransfers.swift

@@ -244,6 +244,9 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate {
             cell.labelInfo.text = ""
             break
         }
+        if self.appDelegate.account != metadata.account {
+            cell.labelInfo.text = NSLocalizedString("_user_", comment: "") + ": \(metadata.userId) " + NSLocalizedString("_in_", comment: "") + " \(metadata.urlBase)"
+        }
         cell.accessibilityLabel = metadata.fileNameView + ", " + (cell.labelInfo.text ?? "")
 
         // Remove last separator