mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 00:01:00 +00:00
Remove items from secondary navigation when browsing
This commit is contained in:
parent
b0132640ab
commit
15cc811102
1 changed files with 28 additions and 26 deletions
|
@ -29,35 +29,37 @@ struct SecondaryNavigationView: View {
|
||||||
Label("secondary-navigation.accounts", systemImage: "rectangle.stack.person.crop")
|
Label("secondary-navigation.accounts", systemImage: "rectangle.stack.person.crop")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Section {
|
if viewModel.identityContext.identity.authenticated && !viewModel.identityContext.identity.pending {
|
||||||
NavigationLink(destination: ListsView(viewModel: .init(identityContext: viewModel.identityContext))
|
Section {
|
||||||
.environmentObject(rootViewModel)) {
|
NavigationLink(destination: ListsView(viewModel: .init(identityContext: viewModel.identityContext))
|
||||||
Label("secondary-navigation.lists", systemImage: "scroll")
|
.environmentObject(rootViewModel)) {
|
||||||
}
|
Label("secondary-navigation.lists", systemImage: "scroll")
|
||||||
ForEach([Timeline.favorites, Timeline.bookmarks]) { timeline in
|
}
|
||||||
Button {
|
ForEach([Timeline.favorites, Timeline.bookmarks]) { timeline in
|
||||||
viewModel.navigate(timeline: timeline)
|
Button {
|
||||||
} label: {
|
viewModel.navigate(timeline: timeline)
|
||||||
Label {
|
} label: {
|
||||||
Text(timeline.title).foregroundColor(.primary)
|
Label {
|
||||||
} icon: {
|
Text(timeline.title).foregroundColor(.primary)
|
||||||
Image(systemName: timeline.systemImageName)
|
} icon: {
|
||||||
|
Image(systemName: timeline.systemImageName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if let followRequestCount = viewModel.identityContext.identity.account?.followRequestCount,
|
||||||
if let followRequestCount = viewModel.identityContext.identity.account?.followRequestCount,
|
followRequestCount > 0 {
|
||||||
followRequestCount > 0 {
|
Button {
|
||||||
Button {
|
viewModel.navigateToFollowerRequests()
|
||||||
viewModel.navigateToFollowerRequests()
|
} label: {
|
||||||
} label: {
|
Label {
|
||||||
Label {
|
HStack {
|
||||||
HStack {
|
Text("follow-requests").foregroundColor(.primary)
|
||||||
Text("follow-requests").foregroundColor(.primary)
|
Spacer()
|
||||||
Spacer()
|
Text(verbatim: String(followRequestCount))
|
||||||
Text(verbatim: String(followRequestCount))
|
}
|
||||||
|
} icon: {
|
||||||
|
Image(systemName: "person.badge.plus")
|
||||||
}
|
}
|
||||||
} icon: {
|
|
||||||
Image(systemName: "person.badge.plus")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue