✨ App info header on watchOS
This commit is contained in:
@@ -58,9 +58,8 @@ class ImageLoader: ObservableObject {
|
||||
switch result {
|
||||
case .success(let value):
|
||||
self.image = Image(uiImage: value.image)
|
||||
print("[watchOS] Image loaded successfully from \(value.cacheType == .none ? "network" : "cache (\(value.cacheType))").")
|
||||
self.isLoading = false
|
||||
case .failure(let error):
|
||||
case .failure(_):
|
||||
// If WebP processor fails (likely due to format), try with default processor
|
||||
let defaultProcessor = DefaultImageProcessor.default
|
||||
self.currentTask = KingfisherManager.shared.retrieveImage(
|
||||
@@ -78,7 +77,6 @@ class ImageLoader: ObservableObject {
|
||||
switch fallbackResult {
|
||||
case .success(let value):
|
||||
self.image = Image(uiImage: value.image)
|
||||
print("[watchOS] Image loaded successfully from \(value.cacheType == .none ? "network" : "cache (\(value.cacheType))") using fallback processor.")
|
||||
case .failure(let fallbackError):
|
||||
self.errorMessage = fallbackError.localizedDescription
|
||||
print("[watchOS] Image loading failed: \(fallbackError.localizedDescription)")
|
||||
|
||||
@@ -380,16 +380,16 @@ class NetworkService {
|
||||
print(context)
|
||||
return []
|
||||
} catch DecodingError.keyNotFound(let key, let context) {
|
||||
print("Key '\(key)' not found:", context.debugDescription)
|
||||
print("codingPath:", context.codingPath)
|
||||
print("[watchOS] Message decode failed: Key '\(key)' not found:", context.debugDescription)
|
||||
print("[watchOS] Message decode failed: codingPath:", context.codingPath)
|
||||
return []
|
||||
} catch DecodingError.valueNotFound(let value, let context) {
|
||||
print("Value '\(value)' not found:", context.debugDescription)
|
||||
print("codingPath:", context.codingPath)
|
||||
print("[watchOS] Message decode failed: Value '\(value)' not found:", context.debugDescription)
|
||||
print("[watchOS] Message decode failed: codingPath:", context.codingPath)
|
||||
return []
|
||||
} catch DecodingError.typeMismatch(let type, let context) {
|
||||
print("Type '\(type)' mismatch:", context.debugDescription)
|
||||
print("codingPath:", context.codingPath)
|
||||
print("[watchOS] Message decode failed: Type '\(type)' mismatch:", context.debugDescription)
|
||||
print("[watchOS] Message decode failed: codingPath:", context.codingPath)
|
||||
return []
|
||||
} catch {
|
||||
print("error: ", error)
|
||||
|
||||
Reference in New Issue
Block a user