Update CollectionListView based on account type (#222)

This commit is contained in:
Angelo Stavrow 2022-09-07 08:28:53 -04:00 committed by GitHub
parent 5e86073499
commit b2f8049632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,10 @@ struct CollectionListView: View {
List(selection: $selectedCollection) {
if model.account.isLoggedIn {
NavigationLink("All Posts", destination: PostListView(selectedCollection: nil, showAllPosts: true))
NavigationLink("Drafts", destination: PostListView(selectedCollection: nil, showAllPosts: false))
NavigationLink(
model.account.server == "https://write.as" ? "Anonymous" : "Drafts",
destination: PostListView(selectedCollection: nil, showAllPosts: false)
)
Section(header: Text("Your Blogs")) {
ForEach(collections, id: \.self) { collection in
NavigationLink(destination: PostListView(selectedCollection: collection, showAllPosts: false),