diff --git a/apple/OmnivoreKit/Sources/App/Views/File.swift b/apple/OmnivoreKit/Sources/App/Views/File.swift new file mode 100644 index 000000000..2110ece3a --- /dev/null +++ b/apple/OmnivoreKit/Sources/App/Views/File.swift @@ -0,0 +1,8 @@ +// +// File.swift +// +// +// Created by Jackson Harper on 9/11/23. +// + +import Foundation diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift index 15c55a6fb..507a1f069 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift @@ -12,24 +12,21 @@ struct MacFeedCardNavigationLink: View { @ObservedObject var viewModel: HomeFeedViewModel var body: some View { - ZStack { - NavigationLink( - destination: LinkItemDetailView( - linkedItemObjectID: item.objectID, - isPDF: item.isPDF - ), - tag: item.objectID, - selection: $viewModel.selectedLinkItem - ) { - EmptyView() - } - .opacity(0) - .buttonStyle(PlainButtonStyle()) - .onAppear { - Task { await viewModel.itemAppeared(item: item, dataService: dataService) } - } + NavigationLink( + destination: LinkItemDetailView( + linkedItemObjectID: item.objectID, + isPDF: item.isPDF + ), + tag: item.objectID, + selection: $viewModel.selectedLinkItem + ) { LibraryItemCard(item: item, viewer: dataService.currentViewer) } + .opacity(0) + .buttonStyle(PlainButtonStyle()) + .onAppear { + Task { await viewModel.itemAppeared(item: item, dataService: dataService) } + } } } @@ -42,22 +39,16 @@ struct FeedCardNavigationLink: View { @ObservedObject var viewModel: HomeFeedViewModel var body: some View { - ZStack { - Button { - viewModel.selectedItem = item - viewModel.linkIsActive = true - } label: { - NavigationLink(destination: EmptyView()) { - EmptyView() - } - .opacity(0) - .buttonStyle(PlainButtonStyle()) - .onAppear { - Task { await viewModel.itemAppeared(item: item, dataService: dataService) } - } - LibraryItemCard(item: item, viewer: dataService.currentViewer) + NavigationLink(destination: LinkItemDetailView( + linkedItemObjectID: item.objectID, + isPDF: item.isPDF + ), label: { + LibraryItemCard(item: item, viewer: dataService.currentViewer) + .padding(10) + }) + .onAppear { + Task { await viewModel.itemAppeared(item: item, dataService: dataService) } } - } } } diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index de560ae6a..62d83945f 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -45,15 +45,15 @@ struct AnimatingCellHeight: AnimatableModifier { var body: some View { ZStack { - if let linkRequest = viewModel.linkRequest { - NavigationLink( - destination: WebReaderLoadingContainer(requestID: linkRequest.serverID), - tag: linkRequest, - selection: $viewModel.linkRequest - ) { - EmptyView() - } - } +// if let linkRequest = viewModel.linkRequest { +// NavigationLink( +// destination: WebReaderLoadingContainer(requestID: linkRequest.serverID), +// tag: linkRequest, +// selection: $viewModel.linkRequest +// ) { +// EmptyView() +// } +// } HomeFeedView( listTitle: $listTitle, isListScrolled: $isListScrolled, diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/LibraryListView.swift b/apple/OmnivoreKit/Sources/App/Views/Home/LibraryListView.swift index 8fdcd89d5..089b237c9 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/LibraryListView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/LibraryListView.swift @@ -38,23 +38,23 @@ struct LibraryListView: View { ) var body: some View { - ZStack { - NavigationLink( - destination: LinkDestination(selectedItem: libraryViewModel.selectedItem), - isActive: $libraryViewModel.linkIsActive - ) { - EmptyView() - } - HomeView(viewModel: libraryViewModel) - .tabItem { - Label { - Text("Library") - } icon: { - Image.tabLibrary - } +// ZStack { +// NavigationLink( +// destination: LinkDestination(selectedItem: libraryViewModel.selectedItem), +// isActive: $libraryViewModel.linkIsActive +// ) { +// EmptyView() +// } + HomeView(viewModel: libraryViewModel) + .tabItem { + Label { + Text("Library") + } icon: { + Image.tabLibrary } - } - .navigationViewStyle(.stack) - .navigationBarTitleDisplayMode(.inline) + } +// } + .navigationViewStyle(.stack) + .navigationBarTitleDisplayMode(.inline) } } diff --git a/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift b/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift index 42c684c73..d31ca60a6 100644 --- a/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift @@ -44,44 +44,49 @@ struct LibraryTabView: View { var body: some View { NavigationView { - ZStack { - NavigationLink( - destination: LinkDestination(selectedItem: libraryViewModel.selectedItem), - isActive: $libraryViewModel.linkIsActive - ) { - EmptyView() - } - // TabView(selection: $selection) { - // BriefingView( - // articleId: "98e017a3-79d5-4049-97bc-ff170153792a" - // ) - // .tabItem { - // Label { - // Text("Your Briefing") - // } icon: { - // Image.tabBriefing.padding(.trailing, 5) - // } - // }.tag(0) +// ZStack { +// NavigationLink( +// destination: LinkDestination(selectedItem: libraryViewModel.selectedItem), +// isActive: $libraryViewModel.linkIsActive +// ) { +// EmptyView() +// } + // TabView(selection: $selection) { + // BriefingView( + // articleId: "98e017a3-79d5-4049-97bc-ff170153792a" + // ) + // .tabItem { + // Label { + // Text("Your Briefing") + // } icon: { + // Image.tabBriefing.padding(.trailing, 5) + // } + // }.tag(0) - HomeView(viewModel: libraryViewModel) - // .tabItem { - // Label { - // Text("Library") - // } icon: { - // Image.tabLibrary - // } - // }.tag(1) + HomeView(viewModel: libraryViewModel) + // .tabItem { + // Label { + // Text("Library") + // } icon: { + // Image.tabLibrary + // } + // }.tag(1) - // HomeView(viewModel: highlightsViewModel) - // .tabItem { - // Label { - // Text("Highlights") - // } icon: { - // Image.tabHighlights - // } - // }.tag(2) - // } - } + // HomeView(viewModel: highlightsViewModel) + // .tabItem { + // Label { + // Text("Highlights") + // } icon: { + // Image.tabHighlights + // } + // }.tag(2) + // } } +// }.introspectNavigationController { controller in +// print("INTROSPECTING CONTROLLER: ", controller.transitionCoordinator) +// controller.transitionCoordinator?.notifyWhenInteractionChanges { context in +// print("interaction changed: ", context) +// } +// } } } diff --git a/apple/OmnivoreKit/Sources/App/Views/SwipeRightToPopViewController.swift b/apple/OmnivoreKit/Sources/App/Views/SwipeRightToPopViewController.swift new file mode 100644 index 000000000..2110ece3a --- /dev/null +++ b/apple/OmnivoreKit/Sources/App/Views/SwipeRightToPopViewController.swift @@ -0,0 +1,8 @@ +// +// File.swift +// +// +// Created by Jackson Harper on 9/11/23. +// + +import Foundation