feat(android): complete first successful skip export

This commit is contained in:
Daniel Arantes Loverde
2026-03-20 10:56:22 -03:00
parent cb7bfef356
commit 9bdb9dfdea
22 changed files with 360 additions and 153 deletions

View File

@@ -11,7 +11,9 @@ struct CachedRemoteImage<Placeholder: View>: View {
let ttl: TimeInterval
let placeholder: Placeholder
#if canImport(UIKit) || canImport(AppKit)
@StateObject var loader = CachedRemoteImageLoader()
#endif
init(
imageURL: String?,
@@ -60,14 +62,19 @@ struct CachedRemoteImage<Placeholder: View>: View {
#endif
}
.onAppear {
#if canImport(UIKit) || canImport(AppKit)
loader.load(imageURL: imageURL, ttl: ttl)
#endif
}
.onChange(of: imageURL) { _, newValue in
#if canImport(UIKit) || canImport(AppKit)
loader.load(imageURL: newValue, ttl: ttl)
#endif
}
}
}
#if canImport(UIKit) || canImport(AppKit)
@MainActor
final class CachedRemoteImageLoader: ObservableObject {
#if canImport(UIKit)
@@ -174,3 +181,4 @@ final class CachedRemoteImageLoader: ObservableObject {
}
#endif
}
#endif