From 7b470cd80eea4b4ef72a3ca8726b8a72a58b01ee Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 22 Feb 2025 00:28:09 -0800 Subject: feat: Development commit --- Sora/Other/AsyncImageWithPreview.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Sora/Other/AsyncImageWithPreview.swift') diff --git a/Sora/Other/AsyncImageWithPreview.swift b/Sora/Other/AsyncImageWithPreview.swift index 48df44e..c1a7188 100644 --- a/Sora/Other/AsyncImageWithPreview.swift +++ b/Sora/Other/AsyncImageWithPreview.swift @@ -126,7 +126,8 @@ struct AsyncImageWithPreview: View { guard let data, let uiImage = UIImage(data: data) else { return } UIImageWriteToSavedPhotosAlbum(uiImage, nil, nil, nil) - }.resume() + } + .resume() } label: { Label("Save Image", systemImage: "square.and.arrow.down") } @@ -135,10 +136,12 @@ struct AsyncImageWithPreview: View { #if os(iOS) Button { let activityViewController = UIActivityViewController( - activityItems: [url ?? URL(string: "")!], applicationActivities: nil) + activityItems: [url ?? URL(string: "")!], applicationActivities: nil + ) UIApplication.shared.windows.first?.rootViewController?.present( - activityViewController, animated: true) + activityViewController, animated: true + ) } label: { Label("Share Image", systemImage: "square.and.arrow.up") } -- cgit v1.2.3