Skip to content

Commit dbf2ecd

Browse files
committed
Show only drafts list if logged out
1 parent c2df4ca commit dbf2ecd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Shared/PostCollection/CollectionListView.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ struct CollectionListView: View {
1111

1212
var body: some View {
1313
List {
14-
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: true)) {
15-
Text("All Posts")
16-
}
1714
if model.account.isLoggedIn {
15+
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: true)) {
16+
Text("All Posts")
17+
}
1818
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: false)) {
1919
Text(model.account.server == "https://write.as" ? "Anonymous" : "Drafts")
2020
}
@@ -27,6 +27,10 @@ struct CollectionListView: View {
2727
}
2828
}
2929
}
30+
} else {
31+
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: false)) {
32+
Text("Drafts")
33+
}
3034
}
3135
}
3236
.navigationTitle(

0 commit comments

Comments
 (0)