Fix FollowUserView not allowing profile tapping
This commit is contained in:
committed by
William Casarin
parent
a76ddea7da
commit
58a707685c
@@ -10,12 +10,16 @@ import SwiftUI
|
||||
struct FollowUserView: View {
|
||||
let target: FollowTarget
|
||||
let damus_state: DamusState
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
static let markdown = Markdown()
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
UserViewRow(damus_state: damus_state, pubkey: target.pubkey)
|
||||
.onTapGesture {
|
||||
navigationCoordinator.push(route: Route.ProfileByKey(pubkey: target.pubkey))
|
||||
}
|
||||
|
||||
FollowButtonView(target: target, follows_you: false, follow_state: damus_state.contacts.follow_state(target.pubkey))
|
||||
}
|
||||
@@ -46,12 +50,14 @@ struct FollowersView: View {
|
||||
let damus_state: DamusState
|
||||
|
||||
@EnvironmentObject var followers: FollowersModel
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
LazyVStack(alignment: .leading) {
|
||||
ForEach(followers.contacts ?? [], id: \.self) { pk in
|
||||
FollowUserView(target: .pubkey(pk), damus_state: damus_state)
|
||||
.environmentObject(navigationCoordinator)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
@@ -70,12 +76,15 @@ struct FollowingView: View {
|
||||
let damus_state: DamusState
|
||||
|
||||
let following: FollowingModel
|
||||
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
LazyVStack(alignment: .leading) {
|
||||
ForEach(following.contacts.reversed(), id: \.self) { pk in
|
||||
FollowUserView(target: .pubkey(pk), damus_state: damus_state)
|
||||
.environmentObject(navigationCoordinator)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
|
||||
Reference in New Issue
Block a user