File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ struct ContentView: View {
7
7
NavigationView {
8
8
SidebarView ( )
9
9
10
- PostListView ( selectedCollection: nil , showAllPosts: true )
10
+ PostListView ( selectedCollection: nil , showAllPosts: model . account . isLoggedIn )
11
11
12
12
Text ( " Select a post, or create a new local draft. " )
13
13
. foregroundColor ( . secondary)
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ struct CollectionListView: View {
11
11
12
12
var body : some View {
13
13
List {
14
- NavigationLink ( destination: PostListView ( selectedCollection: nil , showAllPosts: true ) ) {
15
- Text ( " All Posts " )
16
- }
17
14
if model. account. isLoggedIn {
15
+ NavigationLink ( destination: PostListView ( selectedCollection: nil , showAllPosts: true ) ) {
16
+ Text ( " All Posts " )
17
+ }
18
18
NavigationLink ( destination: PostListView ( selectedCollection: nil , showAllPosts: false ) ) {
19
19
Text ( model. account. server == " https://write.as " ? " Anonymous " : " Drafts " )
20
20
}
@@ -27,6 +27,10 @@ struct CollectionListView: View {
27
27
}
28
28
}
29
29
}
30
+ } else {
31
+ NavigationLink ( destination: PostListView ( selectedCollection: nil , showAllPosts: false ) ) {
32
+ Text ( " Drafts " )
33
+ }
30
34
}
31
35
}
32
36
. navigationTitle (
You can’t perform that action at this time.
0 commit comments