mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Show only drafts list if logged out
This commit is contained in:
parent
c2df4cab86
commit
dbf2ecda60
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user