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 ++++++--- Sora/Other/PostLoadingStage.swift | 5 ----- Sora/Other/PostLoadingState.swift | 5 +++++ 3 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 Sora/Other/PostLoadingStage.swift create mode 100644 Sora/Other/PostLoadingState.swift (limited to 'Sora/Other') 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") } diff --git a/Sora/Other/PostLoadingStage.swift b/Sora/Other/PostLoadingStage.swift deleted file mode 100644 index 800b4dc..0000000 --- a/Sora/Other/PostLoadingStage.swift +++ /dev/null @@ -1,5 +0,0 @@ -enum PostLoadingState { - case loadingPreview - case loadingFile - case loaded -} diff --git a/Sora/Other/PostLoadingState.swift b/Sora/Other/PostLoadingState.swift new file mode 100644 index 0000000..800b4dc --- /dev/null +++ b/Sora/Other/PostLoadingState.swift @@ -0,0 +1,5 @@ +enum PostLoadingState { + case loadingPreview + case loadingFile + case loaded +} -- cgit v1.2.3