summaryrefslogtreecommitdiff
path: root/Sora/Views/Post
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-21 23:30:01 -0800
committerFuwn <[email protected]>2025-02-21 23:30:01 -0800
commitc82c394a2fa8513a83238fb4d0ccdd8567b316d5 (patch)
tree7d392440848a48b5d77edb027f248d8a1e1fa153 /Sora/Views/Post
parentfeat: Development commit (diff)
downloadsora-testing-c82c394a2fa8513a83238fb4d0ccdd8567b316d5.tar.xz
sora-testing-c82c394a2fa8513a83238fb4d0ccdd8567b316d5.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/Post')
-rw-r--r--Sora/Views/Post/PostDetailsView.swift6
-rw-r--r--Sora/Views/Post/PostGridView.swift2
-rw-r--r--Sora/Views/Post/PostView.swift8
3 files changed, 8 insertions, 8 deletions
diff --git a/Sora/Views/Post/PostDetailsView.swift b/Sora/Views/Post/PostDetailsView.swift
index b24b70b..0e2566d 100644
--- a/Sora/Views/Post/PostDetailsView.swift
+++ b/Sora/Views/Post/PostDetailsView.swift
@@ -7,11 +7,11 @@ struct PostDetailsView: View {
private var imageURL: URL? {
switch settings.detailViewType {
case .preview:
- return post.previewURL
+ post.previewURL
case .sample:
- return post.sampleURL
+ post.sampleURL
case .original:
- return post.fileURL
+ post.fileURL
}
}
diff --git a/Sora/Views/Post/PostGridView.swift b/Sora/Views/Post/PostGridView.swift
index 3ccc772..89c762a 100644
--- a/Sora/Views/Post/PostGridView.swift
+++ b/Sora/Views/Post/PostGridView.swift
@@ -59,7 +59,7 @@ struct PostGridView: View {
PostDetailsView(post: post)
}
.onChange(of: manager.searchText) { _, _ in
- if manager.searchText.isEmpty && !isSearching {
+ if manager.searchText.isEmpty, !isSearching {
Task {
manager.performSearch()
}
diff --git a/Sora/Views/Post/PostView.swift b/Sora/Views/Post/PostView.swift
index 7635641..ce46152 100644
--- a/Sora/Views/Post/PostView.swift
+++ b/Sora/Views/Post/PostView.swift
@@ -8,11 +8,11 @@ struct PostView: View {
private var thumbnailURL: URL? {
switch settings.thumbnailType {
case .preview:
- return post.previewURL
+ post.previewURL
case .sample:
- return post.sampleURL
+ post.sampleURL
case .original:
- return post.fileURL
+ post.fileURL
}
}
@@ -23,7 +23,7 @@ struct PostView: View {
.resizable()
.aspectRatio(contentMode: .fit)
.onScrollVisibilityChange { visible in
- if post == posts.last && !manager.endOfData && visible {
+ if post == posts.last, !manager.endOfData, visible {
Task {
manager.loadNextPage()
}