Show only drafts list if logged out

This commit is contained in:
Angelo Stavrow 2020-10-29 10:37:16 -04:00
parent c2df4cab86
commit dbf2ecda60
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -11,10 +11,10 @@ struct CollectionListView: View {
var body: some View {
List {
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: true)) {
Text("All Posts")
}
if model.account.isLoggedIn {
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: true)) {
Text("All Posts")
}
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: false)) {
Text(model.account.server == "https://write.as" ? "Anonymous" : "Drafts")
}
@ -27,6 +27,10 @@ struct CollectionListView: View {
}
}
}
} else {
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: false)) {
Text("Drafts")
}
}
}
.navigationTitle(