diff options
| author | Fuwn <[email protected]> | 2025-03-02 05:59:25 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-03-02 05:59:25 -0800 |
| commit | c1257d527140bba5d9a6aa8140090bd0c77f704f (patch) | |
| tree | 87efdfd401abafc5ce93082040f3cb8974d23d24 /Sora | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-c1257d527140bba5d9a6aa8140090bd0c77f704f.tar.xz sora-testing-c1257d527140bba5d9a6aa8140090bd0c77f704f.zip | |
feat: Development commit
Diffstat (limited to 'Sora')
| -rw-r--r-- | Sora/Views/Post/Details/PostDetailsCarouselView.swift | 2 | ||||
| -rw-r--r-- | Sora/Views/Post/Details/PostDetailsImageView.swift | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Sora/Views/Post/Details/PostDetailsCarouselView.swift b/Sora/Views/Post/Details/PostDetailsCarouselView.swift index de14477..2bc8b32 100644 --- a/Sora/Views/Post/Details/PostDetailsCarouselView.swift +++ b/Sora/Views/Post/Details/PostDetailsCarouselView.swift @@ -48,7 +48,6 @@ struct PostDetailsCarouselView: View { url: posts[index].previewURL, loadingStage: $loadingStage ) - .opacity(loadingStage == .loaded ? 0 : 1) PostDetailsImageView( url: imageURL(post: posts[index]), @@ -56,6 +55,7 @@ struct PostDetailsCarouselView: View { finalLoadingState: .loaded, post: posts[index] ) + .background(.background) } .tag(index) } diff --git a/Sora/Views/Post/Details/PostDetailsImageView.swift b/Sora/Views/Post/Details/PostDetailsImageView.swift index 9c6d6eb..be6e252 100644 --- a/Sora/Views/Post/Details/PostDetailsImageView.swift +++ b/Sora/Views/Post/Details/PostDetailsImageView.swift @@ -88,11 +88,17 @@ struct PostDetailsImageView<Placeholder: View>: View { } } ) - .onAppear { loadingState = finalLoadingState } + .onAppear { + if loadingState != .loaded { + loadingState = finalLoadingState + } + } } placeholder: { placeholder() .onAppear { - loadingState = .loadingPreview + if loadingState != .loaded { + loadingState = .loadingPreview + } } } |