Reorganize the PostCollection

This commit is contained in:
Angelo Stavrow 2020-08-04 13:37:43 -04:00
parent f42318d423
commit 1e179a1fd8
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
2 changed files with 14 additions and 10 deletions

View File

@ -4,13 +4,7 @@ struct CollectionSidebar: View {
@EnvironmentObject var postStore: PostStore
@Binding var selectedCollection: PostCollection?
private let collections = [
allPostsCollection,
defaultDraftCollection,
testPostCollection1,
testPostCollection2,
testPostCollection3
]
private let collections = postCollections
var body: some View {
List {

View File

@ -7,6 +7,16 @@ struct PostCollection: Identifiable, Hashable {
let allPostsCollection = PostCollection(title: "All Posts")
let defaultDraftCollection = PostCollection(title: "Drafts")
let testPostCollection1 = PostCollection(title: "Collection 1")
let testPostCollection2 = PostCollection(title: "Collection 2")
let testPostCollection3 = PostCollection(title: "Collection 3")
let userCollections = [
PostCollection(title: "Collection 1"),
PostCollection(title: "Collection 2"),
PostCollection(title: "Collection 3")
]
let postCollections = [
allPostsCollection,
defaultDraftCollection,
userCollections[0],
userCollections[1],
userCollections[2]
]