Skip to content

Commit 20d5a21

Browse files
committed
fix user click
1 parent 46b428b commit 20d5a21

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

iosApp/flare/UI/Component/Status/StatusView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct StatusView: View {
4747
}
4848
}
4949
.onTapGesture {
50-
data.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
50+
user.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
5151
}
5252
} else {
5353
UserCompatView(data: user) {
@@ -65,7 +65,7 @@ struct StatusView: View {
6565
}
6666
}
6767
.onTapGesture {
68-
data.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
68+
user.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
6969
}
7070
}
7171
}

iosApp/flare/UI/Component/Status/TimelineView.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ import KotlinSharedUI
44
struct TimelineView: View {
55
let data: UiTimeline
66
let detailStatusKey: MicroBlogKey?
7-
7+
@Environment(\.openURL) private var openURL
88
var body: some View {
99
VStack {
1010
if let topMessage = data.topMessage {
1111
StatusTopMessageView(topMessage: topMessage)
12+
.onTapGesture {
13+
if let user = topMessage.user {
14+
user.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
15+
}
16+
}
1217
}
1318
if let content = data.content {
1419
switch onEnum(of: content) {

0 commit comments

Comments
 (0)