mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Fix CollectionSidebar preview and remove dead showPosts code
This commit is contained in:
parent
1dc8b4c7ce
commit
fce0c380d2
@ -18,13 +18,9 @@ struct CollectionSidebar: View {
|
||||
.listStyle(SidebarListStyle())
|
||||
}
|
||||
|
||||
func showPosts(for collection: PostCollection) -> [Post] {
|
||||
if collection == allPostsCollection {
|
||||
return postStore.posts
|
||||
} else {
|
||||
return postStore.posts.filter {
|
||||
$0.collection.title == collection.title
|
||||
}
|
||||
}
|
||||
struct CollectionSidebar_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CollectionSidebar()
|
||||
.environmentObject(testPostStore)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user