Refactoring

This commit is contained in:
Ali
2021-09-24 11:59:21 +03:00
parent 54841cc6fb
commit 7140c69dbf
52 changed files with 421 additions and 502 deletions

View File

@@ -1317,7 +1317,7 @@ private func mapPeersToFriends(accountId: AccountRecordId, accountPeerId: PeerId
}
}
} else if let resource = smallestImageRepresentation(peer.profileImageRepresentations)?.resource, let path = mediaBox.completedResourcePath(resource) {
let cachedPath = mediaBox.cachedRepresentationPathForId(resource.id.uniqueId, representationId: "intents.png", keepDuration: .shortLived)
let cachedPath = mediaBox.cachedRepresentationPathForId(resource.id.stringRepresentation, representationId: "intents.png", keepDuration: .shortLived)
if let _ = fileSize(cachedPath) {
do {
let data = try Data(contentsOf: URL(fileURLWithPath: cachedPath), options: .alwaysMapped)