summaryrefslogtreecommitdiff
path: root/Sora/Other/AsyncImageWithPreview.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-21 23:30:01 -0800
committerFuwn <[email protected]>2025-02-21 23:30:01 -0800
commitc82c394a2fa8513a83238fb4d0ccdd8567b316d5 (patch)
tree7d392440848a48b5d77edb027f248d8a1e1fa153 /Sora/Other/AsyncImageWithPreview.swift
parentfeat: Development commit (diff)
downloadsora-testing-c82c394a2fa8513a83238fb4d0ccdd8567b316d5.tar.xz
sora-testing-c82c394a2fa8513a83238fb4d0ccdd8567b316d5.zip
feat: Development commit
Diffstat (limited to 'Sora/Other/AsyncImageWithPreview.swift')
-rw-r--r--Sora/Other/AsyncImageWithPreview.swift8
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
}
}
}