summaryrefslogtreecommitdiff
path: root/Sora/Views/Post
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-11 06:32:46 -0700
committerFuwn <[email protected]>2025-07-11 06:32:46 -0700
commit2e079945cb3c68ed05750757b59f0acc59155010 (patch)
tree23901f3b5ef4956f7983bccc2922b9b9378dfcbb /Sora/Views/Post
parentfeat: Development commit (diff)
downloadsora-testing-2e079945cb3c68ed05750757b59f0acc59155010.tar.xz
sora-testing-2e079945cb3c68ed05750757b59f0acc59155010.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/Post')
-rw-r--r--Sora/Views/Post/Details/PostDetailsImageView.swift8
1 files changed, 5 insertions, 3 deletions
diff --git a/Sora/Views/Post/Details/PostDetailsImageView.swift b/Sora/Views/Post/Details/PostDetailsImageView.swift
index a62171e..9ec2079 100644
--- a/Sora/Views/Post/Details/PostDetailsImageView.swift
+++ b/Sora/Views/Post/Details/PostDetailsImageView.swift
@@ -187,6 +187,8 @@ struct PostDetailsImageView<Placeholder: View>: View {
guard let url = self.url else { return }
let provider = manager.provider
+ let detailViewQuality = settings.detailViewQuality
+ let saveTagsToFile = settings.saveTagsToFile
URLSession.shared.dataTask(with: url) { data, _, _ in
guard let data, let post else { return }
@@ -203,11 +205,11 @@ struct PostDetailsImageView<Placeholder: View>: View {
to:
picturesURL
.appendingPathComponent(
- "\(post.id)_\(settings.detailViewQuality.rawValue.lowercased()).\(url.pathExtension)"
+ "\(post.id)_\(detailViewQuality.rawValue.lowercased()).\(url.pathExtension)"
)
)
- if settings.saveTagsToFile {
+ if saveTagsToFile {
try post.tags.joined(separator: "\n").write(
to: picturesURL.appendingPathComponent(
"\(post.id).txt"
@@ -221,7 +223,7 @@ struct PostDetailsImageView<Placeholder: View>: View {
Task {
await sendLocalNotification(
title: "Sora",
- body: "Image \(settings.saveTagsToFile ? "and tags" : "") saved (\(post.id))"
+ body: "Image \(saveTagsToFile ? "and tags" : "") saved (\(post.id))"
)
}
#endif