diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift index 5b42c044a..9acaa9390 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift @@ -37,7 +37,9 @@ struct FeedCardNavigationLink: View { .onAppear { Task { await viewModel.itemAppeared(item: item, dataService: dataService) } } - FeedCard(item: item) + FeedCard(item: item) { + viewModel.selectedLinkItem = item.objectID + } } } } diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index fcd34ec8f..1a39ef7f7 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -3,10 +3,12 @@ import SwiftUI import Utils public struct FeedCard: View { + let tapHandler: () -> Void @ObservedObject var item: LinkedItem - public init(item: LinkedItem) { + public init(item: LinkedItem, tapHandler: @escaping () -> Void) { self.item = item + self.tapHandler = tapHandler } public var body: some View { @@ -73,7 +75,11 @@ public struct FeedCard: View { } Spacer() } - }.padding(.top, 8) + } + .padding(.top, 8) + .onTapGesture { + tapHandler() + } } } .padding(.top, 10)