marinofaggiana 3 tahun lalu
induk
melakukan
afdaadc039
1 mengubah file dengan 2 tambahan dan 4 penghapusan
  1. 2 4
      iOSClient/Networking/NCOperationQueue.swift

+ 2 - 4
iOSClient/Networking/NCOperationQueue.swift

@@ -492,11 +492,9 @@ class NCOperationDownloadAvatar: ConcurrentOperation {
                         }
                     }
                     
-                } else if errorCode == NCGlobal.shared.errorNotModified {
+                } else if errorCode == NCGlobal.shared.errorNotModified, let image = UIImage(contentsOfFile: self.fileNameLocalPath) {
                     #if !EXTENSION
-                    if (UIApplication.shared.delegate as! AppDelegate).avatars[self.user] == nil, let image = UIImage(contentsOfFile: self.fileNameLocalPath) {
-                        (UIApplication.shared.delegate as! AppDelegate).avatars[self.user] = image
-                    }
+                    (UIApplication.shared.delegate as! AppDelegate).avatars[self.user] = image
                     #endif
                 }