From c2df4cab8672ab81926e9bd28b1a7e44515ef347 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Thu, 29 Oct 2020 10:36:43 -0400 Subject: [PATCH 1/2] Default to all-posts list if logged in, drafts otherwise --- Shared/Navigation/ContentView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared/Navigation/ContentView.swift b/Shared/Navigation/ContentView.swift index ee33945..426b112 100644 --- a/Shared/Navigation/ContentView.swift +++ b/Shared/Navigation/ContentView.swift @@ -7,7 +7,7 @@ struct ContentView: View { NavigationView { SidebarView() - PostListView(selectedCollection: nil, showAllPosts: true) + PostListView(selectedCollection: nil, showAllPosts: model.account.isLoggedIn) Text("Select a post, or create a new local draft.") .foregroundColor(.secondary) From dbf2ecda60dd143717ab4353bd5843a468e9e403 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Thu, 29 Oct 2020 10:37:16 -0400 Subject: [PATCH 2/2] Show only drafts list if logged out --- Shared/PostCollection/CollectionListView.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Shared/PostCollection/CollectionListView.swift b/Shared/PostCollection/CollectionListView.swift index e8e50e9..9dbcf68 100644 --- a/Shared/PostCollection/CollectionListView.swift +++ b/Shared/PostCollection/CollectionListView.swift @@ -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(