summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Details
diff options
context:
space:
mode:
Diffstat (limited to 'Sora/Views/Post/Details')
-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