Move favorites and bookmarks

This commit is contained in:
Justin Mazzocchi 2020-12-03 12:41:28 -08:00
parent ea8462f26b
commit dc296fc8ae
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
4 changed files with 4 additions and 12 deletions

View file

@ -18,7 +18,7 @@ public extension Timeline {
typealias Id = String
static let unauthenticatedDefaults: [Timeline] = [.local, .federated]
static let authenticatedDefaults: [Timeline] = [.home, .local, .federated]
static let authenticatedDefaults: [Timeline] = [.home, .local, .federated, .favorites, .bookmarks]
var filterContext: Filter.Context? {
switch self {

View file

@ -216,7 +216,7 @@ extension TableViewController: ZoomAnimatorDelegate {
func referenceViewFrameInTransitioningView(for zoomAnimator: ZoomAnimator) -> CGRect? {
guard let referenceView = referenceView(for: zoomAnimator) else { return nil }
return tabBarController?.view.convert(referenceView.frame, from: referenceView.superview)
return parent?.view.convert(referenceView.frame, from: referenceView.superview)
}
}

View file

@ -93,9 +93,9 @@ public extension NavigationViewModel {
var timelineSubtitle: String {
switch timeline {
case .home, .list:
case .home, .favorites, .bookmarks, .list:
return identification.identity.handle
case .local, .federated, .tag, .profile, .favorites, .bookmarks:
case .local, .federated, .tag, .profile:
return identification.identity.instance?.uri ?? ""
}
}

View file

@ -56,14 +56,6 @@ struct SecondaryNavigationView: View {
NavigationLink(destination: ListsView(viewModel: .init(identification: viewModel.identification))) {
Label("secondary-navigation.lists", systemImage: "scroll")
}
NavigationLink(destination: TableView(viewModelClosure: viewModel.favoritesViewModel)
.navigationTitle(Text("favorites"))) {
Label("favorites", systemImage: "star")
}
NavigationLink(destination: TableView(viewModelClosure: viewModel.bookmarksViewModel)
.navigationTitle(Text("bookmarks"))) {
Label("bookmarks", systemImage: "bookmark")
}
}
Section {
NavigationLink(