feat(android): complete first successful skip export
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -30,7 +30,7 @@ struct SnackbarOverlay: View {
|
||||
.padding(.bottom, 16)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(message.style.backgroundColor)
|
||||
.contentShape(Rectangle())
|
||||
.appContentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
center.handleTap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user