diff options
Diffstat (limited to 'Sora/Other')
| -rw-r--r-- | Sora/Other/AsyncImageWithPreview.swift | 9 | ||||
| -rw-r--r-- | Sora/Other/PostLoadingState.swift (renamed from Sora/Other/PostLoadingStage.swift) | 0 |
2 files changed, 6 insertions, 3 deletions
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<Placeholder: View>: 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<Placeholder: View>: 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") } diff --git a/Sora/Other/PostLoadingStage.swift b/Sora/Other/PostLoadingState.swift index 800b4dc..800b4dc 100644 --- a/Sora/Other/PostLoadingStage.swift +++ b/Sora/Other/PostLoadingState.swift |