marinofaggiana %!s(int64=3) %!d(string=hai) anos
pai
achega
afdaadc039
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  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
                 }