diff options
| author | Fuwn <[email protected]> | 2025-02-21 23:30:01 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-21 23:30:01 -0800 |
| commit | c82c394a2fa8513a83238fb4d0ccdd8567b316d5 (patch) | |
| tree | 7d392440848a48b5d77edb027f248d8a1e1fa153 /Sora/Other/AsyncImageWithPreview.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-c82c394a2fa8513a83238fb4d0ccdd8567b316d5.tar.xz sora-testing-c82c394a2fa8513a83238fb4d0ccdd8567b316d5.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Other/AsyncImageWithPreview.swift')
| -rw-r--r-- | Sora/Other/AsyncImageWithPreview.swift | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Sora/Other/AsyncImageWithPreview.swift b/Sora/Other/AsyncImageWithPreview.swift index 8d93ee5..43b31c4 100644 --- a/Sora/Other/AsyncImageWithPreview.swift +++ b/Sora/Other/AsyncImageWithPreview.swift @@ -39,7 +39,7 @@ struct AsyncImageWithPreview<Placeholder: View>: View { .resizable() .scaledToFit() .onAppear { - self.loadingState = finalLoadingState + loadingState = finalLoadingState } .scaleEffect(finalScale * currentScale) .offset(x: finalOffset.width + currentOffset.width, @@ -118,10 +118,10 @@ struct AsyncImageWithPreview<Placeholder: View>: View { .contextMenu { #if os(iOS) Button { - guard let url = url else { return } + guard let url else { return } URLSession.shared.dataTask(with: url) { data, _, _ in - guard let data = data, let uiImage = UIImage(data: data) else { return } + guard let data, let uiImage = UIImage(data: data) else { return } UIImageWriteToSavedPhotosAlbum(uiImage, nil, nil, nil) }.resume() @@ -155,7 +155,7 @@ struct AsyncImageWithPreview<Placeholder: View>: View { } placeholder: { placeholder() .onAppear { - self.loadingState = .loadingPreview + loadingState = .loadingPreview } } } |