Skip to content

Commit 1e6a94b

Browse files
committed
fix status media tap position
1 parent f118960 commit 1e6a94b

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@ struct StatusMediaView: View {
1717
var body: some View {
1818
AdaptiveGrid(singleFollowsImageAspect: false, spacing: 4, maxColumns: 3) {
1919
ForEach(data, id: \.url) { item in
20-
Color.clear
20+
Color.gray
21+
.opacity(0.2)
22+
.onTapGesture {
23+
if !sensitive || !isBlur {
24+
// Only allow tap if not sensitive or already unblurred
25+
selectedItem = item
26+
showFullScreen = true
27+
}
28+
}
2129
.overlay {
2230
MediaView(data: item)
23-
.onTapGesture {
24-
if !sensitive || !isBlur {
25-
// Only allow tap if not sensitive or already unblurred
26-
selectedItem = item
27-
showFullScreen = true
28-
}
29-
}
31+
.allowsHitTesting(false)
3032
}
3133
.overlay(alignment: .bottomTrailing) {
3234
if let alt = item.description_, !alt.isEmpty {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ struct TimelineUserView: View {
77
var body: some View {
88
VStack {
99
UserCompatView(data: data.value)
10+
.onTapGesture {
11+
data.value.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
12+
}
1013
if !data.button.isEmpty {
1114
HStack {
1215
ForEach(0..<data.button.count, id: \.self) { index in

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import SwiftUI
22
import KotlinSharedUI
33

44
struct UserListView: View {
5+
@Environment(\.openURL) private var openURL
56
let data: UiTimeline.ItemContentUserList
67
var body: some View {
78
VStack {
@@ -16,6 +17,9 @@ struct UserListView: View {
1617
RoundedRectangle(cornerRadius: 16)
1718
.stroke(Color(.separator), lineWidth: 1)
1819
)
20+
.onTapGesture {
21+
user.onClicked(ClickContext(launcher: AppleUriLauncher(openUrl: openURL)))
22+
}
1923
}
2024
}
2125
}

0 commit comments

Comments
 (0)