Run SwiftFormat.

This commit is contained in:
Doug
2026-05-27 14:38:50 +01:00
committed by Doug
parent 5138e05e47
commit fa67713726
573 changed files with 2426 additions and 2426 deletions
@@ -29,7 +29,7 @@ actor MediaLoader: MediaLoaderProtocol {
// don't have an accompanying ClientMock to own it.
private weak var client: ClientProtocol?
private var ongoingRequests = [MediaSourceProxy: MediaRequest]()
init(client: ClientProtocol) {
self.client = client
}
@@ -18,7 +18,7 @@ enum MediaLoaderError: Error {
// sourcery: AutoMockable
protocol MediaLoaderProtocol: Sendable {
func loadMediaContentForSource(_ source: MediaSourceProxy) async throws -> Data
func loadMediaThumbnailForSource(_ source: MediaSourceProxy, width: UInt, height: UInt) async throws -> Data
func loadMediaFileForSource(_ source: MediaSourceProxy, filename: String?) async throws -> MediaFileHandleProxy
@@ -44,7 +44,7 @@ struct MediaProvider: MediaProviderProtocol {
let image = cacheResult.image {
return .success(image)
}
do {
let imageData: Data
if let size {
@@ -52,14 +52,14 @@ struct MediaProvider: MediaProviderProtocol {
} else {
imageData = try await mediaLoader.loadMediaContentForSource(source)
}
guard let image = UIImage(data: imageData) else {
MXLog.error("Invalid image data")
return .failure(.invalidImageData)
}
try await imageCache.store(image, forKey: cacheKey)
return .success(image)
} catch {
MXLog.error("Failed retrieving image with error: \(error)")