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
                 }