Remove items from secondary navigation when browsing

This commit is contained in:
Justin Mazzocchi 2021-01-31 06:25:31 -08:00
parent b0132640ab
commit 15cc811102
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
1 changed files with 28 additions and 26 deletions

View File

@ -29,6 +29,7 @@ struct SecondaryNavigationView: View {
Label("secondary-navigation.accounts", systemImage: "rectangle.stack.person.crop") Label("secondary-navigation.accounts", systemImage: "rectangle.stack.person.crop")
} }
} }
if viewModel.identityContext.identity.authenticated && !viewModel.identityContext.identity.pending {
Section { Section {
NavigationLink(destination: ListsView(viewModel: .init(identityContext: viewModel.identityContext)) NavigationLink(destination: ListsView(viewModel: .init(identityContext: viewModel.identityContext))
.environmentObject(rootViewModel)) { .environmentObject(rootViewModel)) {
@ -62,6 +63,7 @@ struct SecondaryNavigationView: View {
} }
} }
} }
}
Section { Section {
NavigationLink( NavigationLink(
destination: PreferencesView(viewModel: .init(identityContext: viewModel.identityContext)) destination: PreferencesView(viewModel: .init(identityContext: viewModel.identityContext))