mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
handle cell taps on labels scroll
This commit is contained in:
parent
508763b061
commit
7c33a311d6
2 changed files with 11 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue