Custom page link texts, optional post title
This commit is contained in:
@ -22,7 +22,7 @@ struct PostListView: View {
|
||||
guard !searchString.isEmpty else {
|
||||
return content.posts
|
||||
}
|
||||
return content.posts.filter { $0.localized(in: language).title.contains(searchString) }
|
||||
return content.posts.filter { $0.contains(searchString) }
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@ -31,7 +31,7 @@ struct PostListView: View {
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.padding(.horizontal, 8)
|
||||
List(filteredPosts, selection: $selectedPost) { post in
|
||||
Text(post.localized(in: language).title).tag(post)
|
||||
Text(post.title(in: language)).tag(post)
|
||||
}
|
||||
}.onAppear {
|
||||
if selectedPost == nil {
|
||||
|
Reference in New Issue
Block a user