summaryrefslogtreecommitdiff
path: root/Sora/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Sora/Views')
-rw-r--r--Sora/Views/Post/Grid/PostGridView.swift12
1 files changed, 11 insertions, 1 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift
index 718c177..b355b2f 100644
--- a/Sora/Views/Post/Grid/PostGridView.swift
+++ b/Sora/Views/Post/Grid/PostGridView.swift
@@ -36,7 +36,17 @@ struct PostGridView: View {
)
}
}
- .onSubmit(of: .search, manager.performSearch)
+ .onSubmit(of: .search) {
+ manager.performSearch()
+ settings
+ .appendToSearchHistory(
+ BooruSearchQuery(
+ provider: settings.preferredBooru,
+ tags: manager.tags,
+ searchedAt: Date()
+ )
+ )
+ }
.navigationDestination(for: BooruPost.self) { post in
PostDetailsView(post: post)
}