diff options
Diffstat (limited to 'Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift')
| -rw-r--r-- | Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift b/Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift index f733a89..e43be47 100644 --- a/Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift +++ b/Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift @@ -14,7 +14,9 @@ struct PostDetailsCarouselView: View { posts: [BooruPost], loadingStage: Binding<BooruPostLoadingState>, focusedPost: BooruPost? = nil, - onFocusedPostChange: @escaping (BooruPost) -> Void = { _ in } + onFocusedPostChange: @escaping (BooruPost) -> Void = { _ in + // Default no-op callback for previews and callers that don't need focus updates. + } ) { self.posts = posts self.focusedPost = focusedPost @@ -101,7 +103,12 @@ struct PostDetailsCarouselView: View { urlsToPreload.append(posts[index].previewURL) } - cacheManager.preloadImages(urlsToPreload) + cacheManager.preloadImages( + urlsToPreload, + domain: manager.domain, + sendUserAgent: settings.sendBooruUserAgent, + customUserAgent: settings.customBooruUserAgent + ) } private func syncCurrentIndexWithFocus() { |