mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Reorganize the PostCollection
This commit is contained in:
parent
f42318d423
commit
1e179a1fd8
@ -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 {
|
||||
|
@ -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]
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user