marinofaggiana 3 년 전
부모
커밋
afdaadc039
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  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
                 }