summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Details/Carousel
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-22 13:40:57 +0000
committerFuwn <[email protected]>2026-03-22 14:02:13 +0000
commit92a34a801f423e7fafa9432bc2f48080855a5a53 (patch)
tree757f725d3b890fea93f2d3798ce0e9cff6e6c237 /Sora/Views/Post/Details/Carousel
parentbuild: wire xcodegen team id through just (diff)
downloadsora-testing-92a34a801f423e7fafa9432bc2f48080855a5a53.tar.xz
sora-testing-92a34a801f423e7fafa9432bc2f48080855a5a53.zip
fix: send booru headers for image requests
Diffstat (limited to 'Sora/Views/Post/Details/Carousel')
-rw-r--r--Sora/Views/Post/Details/Carousel/PostDetailsCarouselView.swift11
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() {