Page MenuHomeMusing Studio

No OneTemporary

diff --git a/Shared/Navigation/ContentView.swift b/Shared/Navigation/ContentView.swift
index 513a3cc..95108df 100644
--- a/Shared/Navigation/ContentView.swift
+++ b/Shared/Navigation/ContentView.swift
@@ -1,42 +1,42 @@
import SwiftUI
struct ContentView: View {
@ObservedObject var postStore: PostStore
@State private var selectedCollection: PostCollection = allPostsCollection
var body: some View {
NavigationView {
VStack {
PostList(
title: selectedCollection.title,
posts: showPosts(for: selectedCollection)
)
.frame(maxHeight: .infinity)
.toolbar {
NavigationLink(destination: PostEditor(post: Post())) {
- Image(systemName: "plus")
+ Image(systemName: "square.and.pencil")
}
}
CollectionPicker(selectedCollection: $selectedCollection)
}
Text("Select a post, or create a new draft.")
.foregroundColor(.secondary)
}
.environmentObject(postStore)
}
func showPosts(for: PostCollection) -> [Post] {
if selectedCollection == allPostsCollection {
return postStore.posts
} else {
return postStore.posts.filter { $0.collection.title == selectedCollection.title }
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView(postStore: testPostStore)
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, May 17, 7:08 AM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3732434

Event Timeline