Jul 14 - Using CDN - update
This commit is contained in:
@@ -497,9 +497,13 @@ struct IssueDetailView: View {
|
||||
// ── Resolution Photos (server-side, read display) ──────────────
|
||||
if !issue.resultPhotoServerPaths.isEmpty {
|
||||
Section("Resolution Photos (\(issue.resultPhotoServerPaths.count))") {
|
||||
ForEach(issue.resultPhotoServerPaths, id: \.self) { relativePath in
|
||||
let paths = issue.resultPhotoServerPaths
|
||||
let urls = issue.resultPhotoServerUrls
|
||||
ForEach(paths.indices, id: \.self) { idx in
|
||||
RetryablePhotoView(
|
||||
url: URL(string: ServerConfig.current + "/static/" + relativePath)
|
||||
url: ServerConfig.mediaURL(
|
||||
absolute: idx < urls.count ? urls[idx] : nil,
|
||||
path: paths[idx])
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -571,9 +575,13 @@ struct IssueDetailView: View {
|
||||
// Synced: show server photos only
|
||||
if !issue.photoServerPaths.isEmpty {
|
||||
Section("Photos (\(issue.photoServerPaths.count))") {
|
||||
ForEach(issue.photoServerPaths, id: \.self) { relativePath in
|
||||
let paths = issue.photoServerPaths
|
||||
let urls = issue.photoServerUrls
|
||||
ForEach(paths.indices, id: \.self) { idx in
|
||||
RetryablePhotoView(
|
||||
url: URL(string: ServerConfig.current + "/static/" + relativePath)
|
||||
url: ServerConfig.mediaURL(
|
||||
absolute: idx < urls.count ? urls[idx] : nil,
|
||||
path: paths[idx])
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -748,6 +756,7 @@ struct IssueDetailView: View {
|
||||
// Refresh resolution photos from server
|
||||
if !detail.resultPhotos.isEmpty {
|
||||
issue.resultPhotoServerPaths = detail.resultPhotos
|
||||
issue.resultPhotoServerUrls = detail.resultPhotoUrls
|
||||
}
|
||||
try? context.save()
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user