diff options
| author | Fuwn <[email protected]> | 2025-03-02 16:22:20 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-03-02 16:22:20 -0800 |
| commit | 0e56bffed20aa576b0c6cf20a1d7be728465a6dd (patch) | |
| tree | 53b9d6a48acd1b4cd0756e1668a80cdef969e33c /Sora/Views/Post/Details | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-0e56bffed20aa576b0c6cf20a1d7be728465a6dd.tar.xz sora-testing-0e56bffed20aa576b0c6cf20a1d7be728465a6dd.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Details')
| -rw-r--r-- | Sora/Views/Post/Details/PostDetailsImageView.swift | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Sora/Views/Post/Details/PostDetailsImageView.swift b/Sora/Views/Post/Details/PostDetailsImageView.swift index be6e252..92e95ed 100644 --- a/Sora/Views/Post/Details/PostDetailsImageView.swift +++ b/Sora/Views/Post/Details/PostDetailsImageView.swift @@ -171,11 +171,13 @@ struct PostDetailsImageView<Placeholder: View>: View { private func saveImageToPicturesFolder() { guard let url = self.url else { return } + let provider = manager.provider + URLSession.shared.dataTask(with: url) { data, _, _ in guard let data, let post else { return } let picturesURL = FileManager.default.homeDirectoryForCurrentUser - .appendingPathComponent("Pictures/Sora/\(manager.provider.rawValue)") + .appendingPathComponent("Pictures/Sora/\(provider.rawValue)") do { try FileManager.default.createDirectory( |